aboutsummaryrefslogtreecommitdiff
path: root/src/or/directory.c
Commit message (Collapse)AuthorAge
* Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-05-30
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | The conflicts were mainly caused by the routerinfo->node transition. Conflicts: src/or/circuitbuild.c src/or/command.c src/or/connection_edge.c src/or/directory.c src/or/dirserv.c src/or/relay.c src/or/rendservice.c src/or/routerlist.c
| * Merge branch 'bug3045' into maint-0.2.2Nick Mathewson2011-05-30
| |\ | | | | | | | | | | | | Conflicts: src/or/circuitbuild.c
| | * Log descriptions of nodes, not just nicknames.Nick Mathewson2011-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces a few new functions in router.c to produce a more helpful description of a node than its nickame, and then tweaks nearly all log messages taking a nickname as an argument to call these functions instead. There are a few cases where I left the old log messages alone: in these cases, the nickname was that of an authority (whose nicknames are useful and unique), or the message already included an identity and/or an address. I might have missed a couple more too. This is a fix for bug 3045.
* | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-05-28
|\| |
| * | Fix GCC 4.6's new -Wunused-but-set-variable warnings.Nick Mathewson2011-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most instances were dead code; for those, I removed the assignments. Some were pieces of info we don't currently plan to use, but which we might in the future. For those, I added an explicit cast-to-void to indicate that we know that the thing's unused. Finally, one was a case where we were testing the wrong variable in a unit test. That one I fixed. This resolves bug 3208.
* | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-05-16
|\| |
| * | Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-05-16
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | Fixed trivial conflict due to headers moving into their own .h files from or.h. Conflicts: src/or/or.h
| | * Check fetched rendezvous descriptors' service IDsRobert Ransom2011-05-16
| | |
* | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-05-15
|\| |
| * | Merge branch 'bug3026' into maint-0.2.2Nick Mathewson2011-05-15
| |\ \
| | * | bug 3026: do not upload our vote to ourselfNick Mathewson2011-05-12
| | | |
| * | | Merge remote-tracking branch 'public/bug3122_memcmp_022' into maint-0.2.2Nick Mathewson2011-05-12
| |\ \ \ | | |/ / | |/| |
* | | | Merge remote-tracking branch 'public/bug3122_memcmp_023'Nick Mathewson2011-05-12
|\ \ \ \
| * \ \ \ Merge remote-tracking branch 'public/bug3122_memcmp_022' into bug3122_memcmp_023Nick Mathewson2011-05-11
| |\ \ \ \ | | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts in various places, mainly node-related. Resolved them in favor of HEAD, with copying of tor_mem* operations from bug3122_memcmp_022. src/common/Makefile.am src/or/circuitlist.c src/or/connection_edge.c src/or/directory.c src/or/microdesc.c src/or/networkstatus.c src/or/router.c src/or/routerlist.c src/test/test_util.c
| | * | | Merge remote-tracking branch 'public/3122_memcmp_squashed' into ↵Nick Mathewson2011-05-11
| | |\ \ \ | | | | |/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bug3122_memcmp_022 Conflicts throughout. All resolved in favor of taking HEAD and adding tor_mem* or fast_mem* ops as appropriate. src/common/Makefile.am src/or/circuitbuild.c src/or/directory.c src/or/dirserv.c src/or/dirvote.c src/or/networkstatus.c src/or/rendclient.c src/or/rendservice.c src/or/router.c src/or/routerlist.c src/or/routerparse.c src/or/test.c
| | | * | Hand-conversion and audit phase of memcmp transitionNick Mathewson2011-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here I looked at the results of the automated conversion and cleaned them up as follows: If there was a tor_memcmp or tor_memeq that was in fact "safe"[*] I changed it to a fast_memcmp or fast_memeq. Otherwise if there was a tor_memcmp that could turn into a tor_memneq or tor_memeq, I converted it. This wants close attention. [*] I'm erring on the side of caution here, and leaving some things as tor_memcmp that could in my opinion use the data-dependent fast_memcmp variant.
| | | * | Automated conversion of memcmp to tor_memcmp/tor_mem[n]eqNick Mathewson2011-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is _exactly_ the result of perl -i -pe 's/\bmemcmp\(/tor_memcmp\(/g' src/*/*.[ch] perl -i -pe 's/\!\s*tor_memcmp\(/tor_memeq\(/g' src/*/*.[ch] perl -i -pe 's/0\s*==\s*tor_memcmp\(/tor_memeq\(/g' src/*/*.[ch] perl -i -pe 's/0\s*!=\s*tor_memcmp\(/tor_memneq\(/g' src/*/*.[ch] git checkout src/common/di_ops.[ch] git checkout src/or/test.c git checkout src/common/test.h
* | | | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-05-12
|\ \ \ \ \ | |/ / / / |/| | | / | | |_|/ | |/| |
| * | | Merge branch 'bug1352' into maint-0.2.2Nick Mathewson2011-05-12
| |\ \ \ | | |/ / | |/| |
| | * | Rate-limit v2 networkstatus download fail warningsNick Mathewson2011-04-28
| | | | | | | | | | | | | | | | | | | | This fixes part of 1352. We don't care deeply about these warnings, since v2 networkstatuses aren't a big deal.
| | * | Rename connection_dir_download_networkstatus_failed: be clear that it means v2Nick Mathewson2011-04-28
| | | |
* | | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-05-09
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/or/directory.c
| * | | Only authorities should automatically download v2 networkstatus documentsNick Mathewson2011-04-28
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clients and relays haven't used them since early 0.2.0.x. The only remaining use by authorities learning about new relays ahead of scedule; see proposal 147 for what we intend to do about that. We're leaving in an option (FetchV2Networkstatus) to manually fetch v2 networkstatuses, because apparently dnsel and maybe bwauth want them. This fixes bug 3022.
* | | Fix check-spaces issues in masterNick Mathewson2011-05-05
| | |
* | | Code to make clients fetch and use microdescriptors for circuit buildingNick Mathewson2011-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | To turn this on, set UseMicrodescriptors to "1" (or "auto" if you want it on-if-you're-a-client). It should go auto-by-default once 0.2.3.1-alpha is released. Because of our node logic, directory caches will never use microdescriptors when they have the right routerinfo available.
* | | Replace _AUTHORITY enum values with _DIRINFO values (automted)Nick Mathewson2011-05-05
| | |
* | | Automated rename from authority_type_t to dirinfo_type_tNick Mathewson2011-05-05
| | | | | | | | | | | | | | | We were already overloading this type to mean "a directory that can serve us X" in addition to "a directory that is an authority for X."
* | | Merge maint-0.2.2 for the bug1090-part1-squashed branchNick Mathewson2011-04-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolved conflicts in: doc/tor.1.txt src/or/circuitbuild.c src/or/circuituse.c src/or/connection_edge.c src/or/connection_edge.h src/or/directory.c src/or/rendclient.c src/or/routerlist.c src/or/routerlist.h These were mostly releated to the routerinfo_t->node_t conversion.
| * | handle excludenodes for dir fetch/postRoger Dingledine2011-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we're picking a random directory node, never pick an excluded one. But if we've chosen a specific one (or all), allow it unless strictnodes is set (in which case warn so the user knows it's their fault). When warning that we won't connect to a strictly excluded node, log what it was we were trying to do at that node. When ExcludeNodes is set but StrictNodes is not set, we only use non-excluded nodes if we can, but fall back to using excluded nodes if none of those nodes is usable.
* | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-04-07
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/common/address.c src/common/compat_libevent.c src/common/memarea.c src/common/util.h src/or/buffers.c src/or/circuitbuild.c src/or/circuituse.c src/or/connection.c src/or/directory.c src/or/networkstatus.c src/or/or.h src/or/routerlist.c
| * | Remove workaround code for bug539Nick Mathewson2011-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We fixed bug 539 (where directories would say "503" but send data anyway) back in 0.2.0.16-alpha/0.1.2.19. Because most directory versions were affected, we added workaround to make sure that we examined the contents of 503-replies to make sure there wasn't any data for them to find. But now that such routers are nonexistent, we can remove this code. (Even if somebody fired up an 0.1.2.19 directory cache today, it would still be fine to ignore data in its erroneous 503 replies.)
| * | Triage the XXX022 and XXX021 comments remaining in the codeNick Mathewson2011-03-25
| | | | | | | | | | | | | | | Remove some, postpone others, leave some alone. Now the only remaining XXX022s are ones that seem important to fix or investigate.
* | | Merge remote-tracking branch 'public/bug2381'Nick Mathewson2011-04-06
|\ \ \
| * | | Fix infinite recursion when connect() fails in microdesc consensus fetchNick Mathewson2011-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The underlying fix is to stop indicating requests "ns" consensuses by putting NULL in their requested_resource field: we already had a specialized meaning for requested_resource==NULL, which was (more or less) "Treat a failure here as a network failure, since it's too early to possibly be a resource or directory failure." Overloading the two meant that very early microdesc consensus download failures would get treated as ns consensus download failures, so the failure count there would get incremented, but the microdesc download would get retried immediately in an infinite loop. Fix for bug2381. Diagnosed by mobmix.
* | | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-03-15
|\ \ \ \ | | |/ / | |/| |
| * | | Log the source of a rejected POSTed v3 voteRobert Ransom2011-03-15
| | | | | | | | | | | | | | | | Related to ticket 2683.
* | | | Fix memory leak in md-download logicNick Mathewson2011-02-24
| |/ / |/| | | | | | | | | | | | | | Also fix some microdesc comments Fix for bug 2623
* | | Merge branch 'maint-0.2.2'Roger Dingledine2011-02-11
|\| |
| * | Merge branch 'maint-0.2.1' into maint-0.2.2Roger Dingledine2011-02-11
| |\|
| | * fix the other half of bug 1074Roger Dingledine2011-02-10
| | |
* | | 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
| | |
* | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2010-11-15
|\| | | | | | | | | | | | | | | | | Conflicts: src/or/config.c src/or/cpuworker.c
| * | Synx manpage and source wrt option capitalizationSebastian Hahn2010-11-10
| | | | | | | | | | | | | | | | | | We had a spelling discrepancy between the manpage and the source code for some option. Resolve these in favor of the manpage, because it makes more sense (for example, HTTP should be capitalized).
* | | Merge branch 'nodes'Nick Mathewson2010-10-13
|\ \ \
| * | | Spotted another missing checkNick Mathewson2010-10-05
| | | |
| * | | 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
| | | |