aboutsummaryrefslogtreecommitdiff
path: root/src/or/relay.c
AgeCommit message (Collapse)Author
2014-02-25Merge remote-tracking branch 'public/no_itime_queue' into maint-0.2.4Nick Mathewson
2014-02-10Excise the insertion_time_elem_t logicNick Mathewson
It's now redundant with the inserted_time field in packed_cell_t Fixes bug 10870.
2014-02-09Don't treat END_STREAM_REASON_INTERNAL as total circuit failureNick Mathewson
It can happen because we sent something that got an ENETUNREACH response. Bugfix on 0.2.4.8-alpha; fixes a part of bug 10777.
2013-11-15Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4Nick Mathewson
Conflicts: src/or/or.h src/or/relay.c Conflicts were simple to resolve. More fixes were needed for compilation, including: reinstating the tv_to_msec function, and renaming *_conn_cells to *_chan_cells.
2013-11-07Improved circuit queue out-of-memory handlerNick Mathewson
Previously, when we ran low on memory, we'd close whichever circuits had the most queued cells. Now, we close those that have the *oldest* queued cells, on the theory that those are most responsible for us running low on memory, and that those are the least likely to actually drain on their own if we wait a little longer. Based on analysis from a forthcoming paper by Jansen, Tschorsch, Johnson, and Scheuermann. Fixes bug 9093.
2013-10-08Generate bootstrapping status messages for microdescs tooNick Mathewson
Fix for 9927.
2013-06-18Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4Nick Mathewson
Conflicts: src/or/config.c src/or/relay.c
2013-06-18Implement a real OOM-killer for too-long circuit queues.Nick Mathewson
This implements "algorithm 1" from my discussion of bug #9072: on OOM, find the circuits with the longest queues, and kill them. It's also a fix for #9063 -- without the side-effects of bug #9072. The memory bounds aren't perfect here, and you need to be sure to allow some slack for the rest of Tor's usage. This isn't a perfect fix; the rest of the solutions I describe on codeable.
2013-06-15Merge branch 'bug9072-023' into bug9072-024Andrea Shepard
2013-06-15Disable middle relay queue overfill detection code due to possible guard ↵Andrea Shepard
discovery attack
2013-06-13Don't queue more cells as a middle relay than the spec allows to be in flightAndrea Shepard
2013-06-13Don't queue more cells as a middle relay than the spec allows to be in flightAndrea Shepard
2013-05-21Downgrade the unexpected sendme cell warnings for 0.2.4Nick Mathewson
See discussion on #8093
2013-04-11Merge remote-tracking branch 'public/bug8185_diagnostic' into maint-0.2.4Nick Mathewson
2013-03-20Merge remote-tracking branch 'public/bug8475_023' into maint-0.2.4Nick Mathewson
2013-03-19Debugging log for bug 8185Nick Mathewson
If the bug recurs, log the filename and line number that triggered it
2013-03-19Merge branch 'bug7582_v2' into maint-0.2.4Nick Mathewson
2013-03-18Merge remote-tracking branch 'public/bug6174' into maint-0.2.4Nick Mathewson
2013-03-18Handle TRUNCATE correctly if our next channel isn't done yet.Nick Mathewson
Patch from 'cypherpunks'. Fixes bug #7947. Bugfix on 0.0.7.1.
2013-03-14Apply ClientDNSRejectInternalAddresses to IPv6 in RESOLVED cellsNick Mathewson
Fixes bug 8475; bugfix on 0.2.0.7-alpha.
2013-03-11On END_REASON_EXITPOLICY, mark circuit as unusable for that address.Nick Mathewson
Also, don't call the exit node 'reject *' unless our decision to pick that node was based on a non-summarized version of that node's exit policy. rransom and arma came up with the ideas for this fix. Fix for 7582; the summary-related part is a bugfix on 0.2.3.2-alpha.
2013-02-19Stop frobbing timestamp_dirty as our sole means to mark circuits unusableNick Mathewson
In a number of places, we decrement timestamp_dirty by MaxCircuitDirtiness in order to mark a stream as "unusable for any new connections. This pattern sucks for a few reasons: * It is nonobvious. * It is error-prone: decrementing 0 can be a bad choice indeed. * It really wants to have a function. It can also introduce bugs if the system time jumps backwards, or if MaxCircuitDirtiness is increased. So in this patch, I add an unusable_for_new_conns flag to origin_circuit_t, make it get checked everywhere it should (I looked for things that tested timestamp_dirty), and add a new function to frob it. For now, the new function does still frob timestamp_dirty (after checking for underflow and whatnot), in case I missed any cases that should be checking unusable_for_new_conns. Fixes bug 6174. We first used this pattern in 516ef41ac1fd26f338c, which I think was in 0.0.2pre26 (but it could have been 0.0.2pre27).
2013-02-15Merge remote-tracking branch 'public/wide_circ_ids'Nick Mathewson
Conflicts: src/or/channel.h src/or/connection_or.c src/or/cpuworker.c
2013-02-11Suppress a coverity false positive in connection_edge_package_raw_inbufNick Mathewson
Coverity is worried that we're checking entry_conn in some cases, but not in the case where we set entry_conn->pending_optimistic_data. This commit should calm it down (CID 718623).
2013-02-08Add explicit check for !first_conn in ...resume_edge_reading_helperNick Mathewson
This check isn't necessary (see comment on #7801), but it took at least two smart people a little while to see why it wasn't necessary, so let's have it in to make the code more readable.
2013-02-08Improve comment about our random stream choice algorithmNick Mathewson
2013-02-08Fix numerous problems with Tor's weak RNG.Nick Mathewson
We need a weak RNG in a couple of places where the strong RNG is both needless and too slow. We had been using the weak RNG from our platform's libc implementation, but that was problematic (because many platforms have exceptionally horrible weak RNGs -- like, ones that only return values between 0 and SHORT_MAX) and because we were using it in a way that was wrong for LCG-based weak RNGs. (We were counting on the low bits of the LCG output to be as random as the high ones, which isn't true.) This patch adds a separate type for a weak RNG, adds an LCG implementation for it, and uses that exclusively where we had been using the platform weak RNG.
2013-02-07Merge branch 'bug7902'Nick Mathewson
2013-02-01Merge branch 'rename_log_7599'Nick Mathewson
2013-02-01Help us track bug 8093:Roger Dingledine
Improve the log message when "Bug/attack: unexpected sendme cell from client" occurs.
2013-02-01fix wide lines from tor_log renameNick Mathewson
2013-02-01Rename log() to tor_log() for loggingNick Mathewson
This is meant to avoid conflict with the built-in log() function in math.h. It resolves ticket 7599. First reported by dhill. This was generated with the following perl script: #!/usr/bin/perl -w -i -p s/\blog\(LOG_(ERR|WARN|NOTICE|INFO|DEBUG)\s*,\s*/log_\L$1\(/g; s/\blog\(/tor_log\(/g;
2013-01-18Implement Path use bias accounting.Mike Perry
Path use bias measures how often we can actually succeed using the circuits we actually try to use. It is a subset of path bias accounting, but it is computed as a separate statistic because the rate of client circuit use may vary depending on use case.
2013-01-16Adjust control_reason when adjusting reason (related to 7902)Nick Mathewson
2013-01-16When we get an END cell before CONNECTED, don't report SOCKS successNick Mathewson
Bug 7902; fix on 0.1.0.1-rc.
2013-01-16Update the copyright date to 201.Nick Mathewson
2013-01-15Merge remote-tracking branch 'origin/maint-0.2.3'Nick Mathewson
2013-01-14Revert junk accidentally included with "start folding in the changes entries"Nick Mathewson
Looks like Roger's debugging code wanted to take a tour of the world outside his sandbox. This reverts part of commit 19d37202362c0298ae2f3954b0065ccfcef0dbda.
2013-01-14Reject create/begin/etc cells with {circ,stream}ID 0.Nick Mathewson
Otherwise, it's possible to create streams or circuits with these bogus IDs, leading to orphaned circuits or streams, or to ones that can cause bandwidth DOS problems. Fixes bug 7889; bugfix on all released Tors.
2013-01-14start folding in the changes entriesRoger Dingledine
2013-01-08Bug 7691: Send a probe cell down certain types of circs.Mike Perry
In general, if we tried to use a circ for a stream, but then decided to place that stream on a different circuit, we need to probe the original circuit before deciding it was a "success". We also need to do the same for cannibalized circuits that go unused.
2013-01-03Merge branch 'ntor-resquashed'Nick Mathewson
Conflicts: src/or/cpuworker.c src/or/or.h src/test/bench.c
2013-01-03Enable the ntor handshake on the client side.Nick Mathewson
"works for me"
2013-01-03Enable handling of create2/extend2/created2/extended2Nick Mathewson
2013-01-03Teach cpuworker and others about create_cell_t and friendsNick Mathewson
The unit of work sent to a cpuworker is now a create_cell_t; its response is now a created_cell_t. Several of the things that call or get called by this chain of logic now take create_cell_t or created_cell_t too. Since all cpuworkers are forked or spawned by Tor, they don't need a stable wire protocol, so we can just send structs. This saves us some insanity, and helps p
2012-12-25Merge remote-tracking branch 'mikeperry/209-path-bias-changes'Nick Mathewson
2012-12-18Changes from Nick's code review 'part 1'Mike Perry
I think this is actually his third code review of this branch so far.
2012-12-17Don't use the cache when changing an IP address because of an exit policyNick Mathewson
2012-12-17Implement option to turn off DNS cache modification by a client portNick Mathewson
(This is part 3 of making DNS cache use enabled/disabled on a per-client port basis. This implements the UseCacheIPv[46]DNS options)
2012-12-17Implement option to turn off DNS cache use on a client portNick Mathewson
(This is part 2 of making DNS cache use enabled/disabled on a per-client port basis. This implements the CacheIPv[46]DNS options, but not the UseCachedIPv[46] ones.)