aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2010-10-20
|\ | | | | | | | | Conflicts: src/or/networkstatus.c
| * Fix a logic error in 98aee84. Found by boboperNick Mathewson2010-10-20
| |
* | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2010-10-20
|\| | | | | | | | | Conflicts: src/or/networkstatus.c
| * Add a ! to directory_caches_dir_info() to fix a logic errorNick Mathewson2010-10-20
| | | | | | | | | | | | We want to fetch directory info more aggressively if we need it to refuseunknownexits. Thus, we'll want it if our exit policy is _NOT_ reject *.
| * Fix a read of a freed pointer while in set_current_consensusNick Mathewson2010-10-20
| | | | | | | | | | Found by rransom while working on issue #988. Bugfix on 0.2.2.17-alpha. Fixes bug 2097.
* | clarify fmt_addr32 documentation to note that the address is in host-orderNick Mathewson2010-10-15
| |
* | Fix one-time memory leak when initializing libevent. Spotted by SebastianNick Mathewson2010-10-15
| |
* | Merge branch 'bug1992_part1'Nick Mathewson2010-10-15
|\ \
| * | Tweak the fmt_addr32 codeNick Mathewson2010-10-15
| | | | | | | | | | | | Clarify documentation, rename a local, and fix a memory leak.
| * | refactor all these tor_inet_ntoa idiomsRoger Dingledine2010-10-01
| | | | | | | | | | | | but don't refactor the ones that look messy
* | | Remove more unused code from routerlist.cNick Mathewson2010-10-15
| | |
* | | Remove an unused field from circ_buffer_stats_tNick Mathewson2010-10-15
| | |
* | | Improve accuracy of comment about aes_crypt performanceNick Mathewson2010-10-15
| | | | | | | | | | | | | | | | | | | | | The old comment was from before I tried a huge pile of crazy stuff to make the inner loop faster. Short answer: GCC already knows how to unroll loops pretty well. Other short answer: we should have made the relay payload size an even multiple of 4, 8, or ideally 16.
* | | Fix a documention issue in circuitlist.cNick Mathewson2010-10-15
| | |
* | | Kill comments saying to remove asserts once bug930 is solved.Nick Mathewson2010-10-15
| | | | | | | | | | | | It's okay to leave the asserts in: the code doesn't appear in profiles.
* | | fix another typoRoger Dingledine2010-10-15
| | |
* | | Fix an apostrophe in a commentNick Mathewson2010-10-15
| | |
* | | 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.
* | | Add a portable tor_timercmpNick Mathewson2010-10-15
| | | | | | | | | | | | | | | | | | We can't use the platform timercmp, because 1) some platforms don't have them 2) some that do have them only support certain relational operators
* | | Remove XXXs about improving buf_t API: bufferevents are the futureNick Mathewson2010-10-15
| | |
* | | Make the return value of tor_addr_sockaddr always be signedNick Mathewson2010-10-15
| | |
* | | Remove "is this too slow?" XXXX comments for code not appearing in profilesNick Mathewson2010-10-15
| | |
* | | Remove the unused old fuzzy-time codeNick Mathewson2010-10-15
| | |
* | | Fix an xxx wrt picking libevent methods known-to-workNick Mathewson2010-10-15
| | | | | | | | | | | | | | | | | | The short version is, "where we want to do it, we have nothing real to chose from and we can't do it easily. Where it's easy to do, we have no reason to do it yet."
* | | Remove an XXX in ntmain.c: a simple function call per loop is not so expensive.Nick Mathewson2010-10-15
| | |
* | | Make check-spaces happySebastian Hahn2010-10-14
| | |
* | | Rename router_get_by_digest()Sebastian Hahn2010-10-14
| | | | | | | | | | | | | | | We now call the function router_get_by_id_digest() to make clear that we're talking about the identity digest here, not descriptor digest.
* | | Fix a few trivial bugs from the nodelist mergeNick Mathewson2010-10-13
| | |
* | | Fix some XXXXs in connection_add_impl related to bufferevent error checkingNick Mathewson2010-10-13
| | | | | | | | | | | | | | | | | | | | | This might make bufferevents more asserty for a while, but they should make other bugs less likely to go unnoticed. Noted by Sebastian.
* | | Fix a couple users of buf_datalen that slipped in. Found by SebastianNick Mathewson2010-10-13
| | |
* | | Implement node_set_exit_policy_to_reject_all with a flagNick Mathewson2010-10-13
| | | | | | | | | | | | Also remove some debugging code.
* | | Merge remote branch 'arma/bug1982_2'Nick Mathewson2010-10-13
|\ \ \ | | | | | | | | | | | | | | | | Resolved a minor conflict in: src/or/circuitbuild.c
| * | | allow countries and IP addresses in EntryNodesRoger Dingledine2010-09-29
| | | |
* | | | Merge branch 'nodes'Nick Mathewson2010-10-13
|\ \ \ \
| * | | | Add some missing documentation for things added in nodes branchNick Mathewson2010-10-07
| | | | |
| * | | | Fix a compile warning on OSX 10.6Sebastian Hahn2010-10-07
| | | | |
| * | | | Spotted another missing checkNick Mathewson2010-10-05
| | | | |
| * | | | Fix a couple more node_t-related nullpointer bugsNick Mathewson2010-10-04
| | | | |
| * | | | Switch an && to an ||, stop a *NULL.Nick Mathewson2010-10-04
| | | | |
| * | | | More debugging code for node_t branchNick Mathewson2010-10-01
| | | | |
| * | | | Implement policies for nodes (and for microdescriptors too)Nick Mathewson2010-10-01
| | | | |
| * | | | Fix a bug in smartlist_choose_node_by_bandwidthNick Mathewson2010-10-01
| | | | |
| * | | | Implement a few more node-based functionsNick Mathewson2010-10-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of these functions only work for routerinfo-based nodes, and as such are only usable for advisory purposes. Fortunately, our uses of them are compatible with this limitation.
| * | | | Implement node-based router family codeNick Mathewson2010-10-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, make the NodeFamily option into a list of routersets. This lets us git rid of router_in_nickname_list (or whatever it was called) without porting it to work with nodes, and also lets people specify country codes and IP ranges in NodeFamily
| * | | | Rename routerstatus_t.is_running to is_flagged_runningNick Mathewson2010-10-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was the only flag in routerstatus_t that we would previously change in a routerstatus_t in a consensus. We no longer have reason to do so -- and probably never did -- as you can now confirm more easily than you could have done by grepping for is_running before this patch. The name change is to emphasize that the routerstatus_t is_running flag is only there to tell you whether the consensus says it's running, not whether it *you* think it's running.
| * | | | 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 routerstatus_t interfaces constNick Mathewson2010-10-01
| | | | |
| * | | | Try to make most routerinfo_t interfaces constNick Mathewson2010-10-01
| | | | |
| * | | | Implement a basic node and nodelist typeNick Mathewson2010-10-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The node_t type is meant to serve two key functions: 1) Abstracting difference between routerinfo_t and microdesc_t so that clients can use microdesc_t instead of routerinfo_t. 2) Being a central place to hold mutable state about nodes formerly held in routerstatus_t and routerinfo_t. This patch implements a nodelist type that holds a node for every router that we would consider using.
* | | | | Send END cells on bufferevent tunneled directory connsNick Mathewson2010-10-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our old code correctly called bufferevent_flush() on linked connections to make sure that the other side got an EOF event... but it didn't call bufferevent_flush() when the connection wasn't hold_open_until_flushed. Directory connections don't use hold_open_until_flushed, so the linked exit connection never got an EOF, so they never sent a RELAY_END cell to the client, and the client never concluded that data had arrived. The solution is to make the bufferevent_flush() code apply to _all_ closing linked conns whose partner is not already marked for close.