aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.c
AgeCommit message (Collapse)Author
2011-01-03Merge remote branch 'origin/maint-0.2.2'Nick Mathewson
2011-01-03Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson
Conflicts: src/common/test.h src/or/test.c
2011-01-03Bump copyright statements to 2011Nick Mathewson
2010-12-19Merge branch 'maint-0.2.2'Roger Dingledine
2010-12-15Merge remote branch fix_security_bug_021 into fix_security_bug_022Nick Mathewson
Conflicts: src/common/memarea.c src/or/or.h src/or/rendclient.c
2010-12-15Make payloads into uint8_t.Nick Mathewson
This will avoid some signed/unsigned assignment-related bugs.
2010-11-11Merge remote branch 'public/refactor_pports'Nick Mathewson
2010-10-29Fix up comments in choose_good_entry_server. Spotted by Robert Ransom.Nick Mathewson
2010-10-15Make the predicted ports logic a little simpler.Nick Mathewson
Mainly, this comes from turning two lists that needed to be kept in synch into a single list of structs. This should save a little RAM, and make the code simpler.
2010-10-15Fold timestamp_created into highres_createdNick Mathewson
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.
2010-10-15Remove "is this too slow?" XXXX comments for code not appearing in profilesNick Mathewson
2010-10-13Merge remote branch 'arma/bug1982_2'Nick Mathewson
Resolved a minor conflict in: src/or/circuitbuild.c
2010-10-04Switch an && to an ||, stop a *NULL.Nick Mathewson
2010-10-01More debugging code for node_t branchNick Mathewson
2010-10-01Initial conversion to use node_t throughout our codebase.Nick Mathewson
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.
2010-10-01Try to make most routerstatus_t interfaces constNick Mathewson
2010-10-01Try to make most routerinfo_t interfaces constNick Mathewson
2010-09-29Merge branch 'bug1772' into maint-0.2.2Roger Dingledine
2010-09-29fix two castsRoger Dingledine
2010-09-29Comment network liveness and change detection behavior.Mike Perry
2010-09-29refactor and recomment; no actual changesRoger Dingledine
2010-09-29Merge commit 'mikeperry/bug1740' into maint-0.2.2Roger Dingledine
2010-09-29Cap the circuit build timeout to the max time we've seen.Mike Perry
Also, cap the measurement timeout to 2X the max we've seen.
2010-09-29Do away with the complexity of the network liveness detection.Mike Perry
We really should ignore any timeouts that have *no* network activity for their entire measured lifetime, now that we have the 95th percentile measurement changes. Usually this is up to a minute, even on fast connections.
2010-09-29Fix state checks on liveness handling.Mike Perry
If we really want all this complexity for these stages here, we need to handle it better for people with large timeouts. It should probably go away, though.
2010-09-29Fix non-live condition checks.Mike Perry
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.
2010-09-29Only count timeout data for 3 hop circuits.Mike Perry
Use 4/3 of this timeout value for 4 hop circuits, and use half of it for canabalized circuits.
2010-09-29allow countries and IP addresses in EntryNodesRoger Dingledine
2010-09-28improve code comments, based on comments from nickRoger Dingledine
2010-09-28handle ugly edge case in retrying entrynodesRoger Dingledine
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.
2010-09-28Actually notice when our last entrynode goes downRoger Dingledine
Otherwise we'd never set have_minimum_dir_info to false, so the "optimistic retry" would never trigger.
2010-09-28optimistically retry EntryNodes on socks requestRoger Dingledine
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.
2010-09-28remove a redundant assertRoger Dingledine
2010-09-28refactor; no actual changesRoger Dingledine
2010-09-28Merge branch 'maint-0.2.1' into maint-0.2.2Roger Dingledine
2010-09-28actually retry bridges when your network goes awayRoger Dingledine
2010-09-22Rename has_completed_circuit to can_complete_circuitNick Mathewson
Also redocument it. Related to #1362.
2010-09-20A start at a patch for bug 1943 (alignment issues)Roger Dingledine
2010-09-16I hear we are close to a release. Clean up the whitespace.Nick Mathewson
2010-09-02Fix behavior of adding a cell to a blocked queue.Nick Mathewson
We frequently add cells to stream-blocked queues for valid reasons that don't mean we need to block streams. The most obvious reason is if the cell arrives over a circuit rather than from an edge: we don't block circuits, no matter how full queues get. The next most obvious reason is that we allow CONNECTED cells from a newly created stream to get delivered just fine. This patch changes the behavior so that we only iterate over the streams on a circuit when the cell in question came from a stream, and we only block the stream that generated the cell, so that other streams can still get their CONNECTEDs in.
2010-08-15Make Sebastian's bug1831 branch build with --enable-gcc-warningsNick Mathewson
2010-08-16Fix misplaced labelsSebastian Hahn
2010-08-16Refactor circuit_build_times_parse_stateSebastian Hahn
Remove the msg parameter to pass an error message out. This wasn't needed and made it harder to detect a memory leak.
2010-08-16Fix a memory leak in circuit_build_times_parse_stateSebastian Hahn
Thanks weasel for noticing.
2010-07-27Create routerparse.hSebastian Hahn
2010-07-27Create rephist.hSebastian Hahn
2010-07-27Create relay.hSebastian Hahn
2010-07-27Create policies.hSebastian Hahn
2010-07-27Create onion.hSebastian Hahn
2010-07-27Create networkstatus.hSebastian Hahn