aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
Commit message (Collapse)AuthorAge
* Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-01-03
|\
| * Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-01-03
| |\ | | | | | | | | | | | | | | | Conflicts: src/common/test.h src/or/test.c
| | * Bump copyright statements to 2011Nick Mathewson2011-01-03
| | |
* | | Fold timestamp_created into highres_createdNick Mathewson2010-10-15
| | | | | | | | | | | | | | | | | | | | | There's no reason to keep a time_t and a struct timeval to represent the same value: highres_created.tv_sec was the same as timestamp_created. This should save a few bytes per circuit.
* | | Fix a couple more node_t-related nullpointer bugsNick Mathewson2010-10-04
| | |
* | | Initial conversion to use node_t throughout our codebase.Nick Mathewson2010-10-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A node_t is an abstraction over routerstatus_t, routerinfo_t, and microdesc_t. It should try to present a consistent interface to all of them. There should be a node_t for a server whenever there is * A routerinfo_t for it in the routerlist * A routerstatus_t in the current_consensus. (note that a microdesc_t alone isn't enough to make a node_t exist, since microdescriptors aren't usable on their own.) There are three ways to get a node_t right now: looking it up by ID, looking it up by nickname, and iterating over the whole list of microdescriptors. All (or nearly all) functions that are supposed to return "a router" -- especially those used in building connections and circuits -- should return a node_t, not a routerinfo_t or a routerstatus_t. A node_t should hold all the *mutable* flags about a node. This patch moves the is_foo flags from routerinfo_t into node_t. The flags in routerstatus_t remain, but they get set from the consensus and should not change. Some other highlights of this patch are: * Looking up routerinfo and routerstatus by nickname is now unified and based on the "look up a node by nickname" function. This tries to look only at the values from current consensus, and not get confused by the routerinfo_t->is_named flag, which could get set for other weird reasons. This changes the behavior of how authorities (when acting as clients) deal with nodes that have been listed by nickname. * I tried not to artificially increase the size of the diff here by moving functions around. As a result, some functions that now operate on nodes are now in the wrong file -- they should get moved to nodelist.c once this refactoring settles down. This moving should happen as part of a patch that moves functions AND NOTHING ELSE. * Some old code is now left around inside #if 0/1 blocks, and should get removed once I've verified that I don't want it sitting around to see how we used to do things. There are still some unimplemented functions: these are flagged with "UNIMPLEMENTED_NODELIST()." I'll work on filling in the implementation here, piece by piece. I wish this patch could have been smaller, but there did not seem to be any piece of it that was independent from the rest. Moving flags forces many functions that once returned routerinfo_t * to return node_t *, which forces their friends to change, and so on.
* | | Try to make most routerinfo_t interfaces constNick Mathewson2010-10-01
|/ /
* | Merge branch 'bug1772' into maint-0.2.2Roger Dingledine2010-09-29
|\ \
| * | no measurement circs if not enough build timesRoger Dingledine2010-09-29
| | | | | | | | | | | | | | | | | | | | | In the first 100 circuits, our timeout_ms and close_ms are the same. So we shouldn't transition circuits to purpose CIRCUIT_PURPOSE_C_MEASURE_TIMEOUT, since they will just timeout again next time we check.
| * | refactor and recomment; no actual changesRoger Dingledine2010-09-29
| | |
| * | Fix non-live condition checks.Mike Perry2010-09-29
| | | | | | | | | | | | | | | | | | | | | | | | Rechecking the timeout condition was foolish, because it is checked on the same codepath. It was also wrong, because we didn't round. Also, the liveness check itself should be <, and not <=, because we only have 1 second resolution.
* | | Merge commit 'mikeperry/bug1739' into maint-0.2.2Roger Dingledine2010-09-29
|\| |
| * | Send control port events for timeouts.Mike Perry2010-09-29
| | | | | | | | | | | | | | | We now differentiate between timeouts and cutoffs by the REASON string and the PURPOSE string.
* | | Merge commit 'mikeperry/bug1740' into maint-0.2.2Roger Dingledine2010-09-29
|\| |
| * | Only count timeout data for 3 hop circuits.Mike Perry2010-09-29
| | | | | | | | | | | | | | | Use 4/3 of this timeout value for 4 hop circuits, and use half of it for canabalized circuits.
* | | improve code comments, based on comments from nickRoger Dingledine2010-09-28
| | |
* | | handle ugly edge case in retrying entrynodesRoger Dingledine2010-09-28
| | | | | | | | | | | | | | | | | | | | | | | | Specifically, a circ attempt that we'd launched while the network was down could timeout after we've marked our entrynodes up, marking them back down again. The fix is to annotate as bad the OR conns that were around before we did the retry, so if a circuit that's attached to them times out we don't do anything about it.
* | | optimistically retry EntryNodes on socks requestRoger Dingledine2010-09-28
|/ / | | | | | | | | We used to mark all our known bridges up when they're all down and we get a new socks request. Now do that when we've set EntryNodes too.
* | fix another piece of 1741Roger Dingledine2010-08-14
| |
* | changes entry for bug 1741Roger Dingledine2010-08-13
| |
* | Add check for CIRCUIT_PURPOSE_S_REND_JOINED.Mike Perry2010-08-13
| | | | | | | | | | These circuits stick around much longer than others on the server side for performance reasons. Their lifetime is controlled by the client.
* | tiny changes i found in my sandboxRoger Dingledine2010-08-09
| |
* | Bug #1222: Clarify new circuit after sleep noticeChris Ball2010-07-31
| | | | | | | | | | ("Application request when we're believed to be offline." -> "Application request when we haven't used client functionality lately.")
* | Create rephist.hSebastian Hahn2010-07-27
| |
* | Create policies.hSebastian Hahn2010-07-27
| |
* | Create control.hSebastian Hahn2010-07-27
| |
* | Create connection_edge.hSebastian Hahn2010-07-27
| |
* | Create connection.hSebastian Hahn2010-07-27
| |
* | Create config.hSebastian Hahn2010-07-27
| |
* | Create circuituse.hSebastian Hahn2010-07-27
| |
* | Create circuitlist.hSebastian Hahn2010-07-27
| |
* | Create circuitbuild.hSebastian Hahn2010-07-27
| |
* | Create rendservice.hSebastian Hahn2010-07-27
| |
* | Create rendclient.hSebastian Hahn2010-07-27
| |
* | Create rendcommon.hSebastian Hahn2010-07-27
| |
* | Create routerlist.hSebastian Hahn2010-07-27
| |
* | Create router.hSebastian Hahn2010-07-27
| |
* | Fix bugs with assuming time_t can be implicitly cast to longNick Mathewson2010-06-29
| | | | | | | | | | | | | | | | | | Many friendly operating systems have 64-bit times, and it's not nice to pass them to an %ld format. It's also extremely not-nice to write a time to the log as an integer. Most people think it's 2010 June 29 23:57 UTC+epsilon, not 1277855805+epsilon.
* | Mention the purpose field for leaked circuits.Mike Perry2010-06-16
| |
* | Be more proactive about closing unused circuits.Mike Perry2010-06-15
| | | | | | | | | | | | We need to ensure that we close timeout measurement circuits. While we're at it, we should close really old circuits of certain types that aren't in use, and log really old circuits of other types.
* | Split the circuit timeout and close codepaths.Mike Perry2010-06-15
| | | | | | | | | | | | | | | | We need to record different statistics at point of timeout, vs the point of forcible closing. Also, give some better names to constants and state file variables to indicate they are not dealing with timeouts, but abandoned circuits.
* | Fix initialization and reset issues with close_ms.Mike Perry2010-06-15
| | | | | | | | Also clean up some log messages.
* | Keep circuits open until the greater of 95th CDF percentile or 60s.Mike Perry2010-06-09
| | | | | | | | | | | | This is done to provide better data to our right-censored Pareto model. We do this by simply marking them with a new purpose.
* | Bug 1245: Ignore negative and large timeouts.Mike Perry2010-05-10
| | | | | | | | | | | | | | | | | | This should prevent some asserts and storage of incorrect build times for the cases where Tor is suspended during a circuit construction, or just after completing a circuit. The idea is that if the circuit build time is much greater than we would have cut it off at, we probably had a suspend event along this codepath, and we should discard the value.
* | Merge branch 'maint-0.2.1'Roger Dingledine2010-04-23
|\|
| * close idle dir-fetch circs earlyRoger Dingledine2010-04-23
| |
* | Merge remote branch 'origin/maint-0.2.1'Nick Mathewson2010-02-27
|\| | | | | | | | | | | Conflicts: src/common/test.h src/or/test.c
| * Update Tor Project copyright yearsNick Mathewson2010-02-27
| |
* | Be more willing to use an unsuitable circuit for exit.Roger Dingledine2009-12-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifically, there are two cases: a) are we willing to start a new circuit at a node not in your ExitNodes config option, and b) are we willing to make use of a circuit that's already established but has an unsuitable exit. Now we discard all your circuits when you set ExitNodes, so the only way you could end up with an exit circuit that ends at an unsuitable place is if we explicitly ran out of exit nodes, StrictNodes was 0, and we built this circuit to solve a stream that needs solving. Fixes bug in dc322931, which would ignore the just-built circuit because it has an unsuitable exit.
* | Merge branch 'safelogging2'Nick Mathewson2009-12-15
|\ \ | | | | | | | | | | | | Conflicts: ChangeLog