aboutsummaryrefslogtreecommitdiff
path: root/src/or/directory.c
AgeCommit message (Collapse)Author
2011-05-16Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson
Fixed trivial conflict due to headers moving into their own .h files from or.h. Conflicts: src/or/or.h
2011-05-16Check fetched rendezvous descriptors' service IDsRobert Ransom
2011-05-15Merge branch 'bug3026' into maint-0.2.2Nick Mathewson
2011-05-12Merge remote-tracking branch 'public/bug3122_memcmp_022' into maint-0.2.2Nick Mathewson
2011-05-12bug 3026: do not upload our vote to ourselfNick Mathewson
2011-05-12Merge branch 'bug1352' into maint-0.2.2Nick Mathewson
2011-05-11Merge remote-tracking branch 'public/3122_memcmp_squashed' into ↵Nick Mathewson
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
2011-05-11Hand-conversion and audit phase of memcmp transitionNick Mathewson
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.
2011-05-11Automated conversion of memcmp to tor_memcmp/tor_mem[n]eqNick Mathewson
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
2011-04-28Rate-limit v2 networkstatus download fail warningsNick Mathewson
This fixes part of 1352. We don't care deeply about these warnings, since v2 networkstatuses aren't a big deal.
2011-04-28Rename connection_dir_download_networkstatus_failed: be clear that it means v2Nick Mathewson
2011-04-28Only authorities should automatically download v2 networkstatus documentsNick Mathewson
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.
2011-04-26handle excludenodes for dir fetch/postRoger Dingledine
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.
2011-03-25Remove workaround code for bug539Nick Mathewson
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.)
2011-03-25Triage the XXX022 and XXX021 comments remaining in the codeNick Mathewson
Remove some, postpone others, leave some alone. Now the only remaining XXX022s are ones that seem important to fix or investigate.
2011-03-15Log the source of a rejected POSTed v3 voteRobert Ransom
Related to ticket 2683.
2011-02-11Merge branch 'maint-0.2.1' into maint-0.2.2Roger Dingledine
2011-02-10fix the other half of bug 1074Roger Dingledine
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-11-10Synx manpage and source wrt option capitalizationSebastian Hahn
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).
2010-09-22Rename has_completed_circuit to can_complete_circuitNick Mathewson
Also redocument it. Related to #1362.
2010-09-13Merge remote branch 'public/pretty-signature-log'Nick Mathewson
2010-09-12Merge branch 'bug1138'Nick Mathewson
2010-09-12Clean up a couple more bug1138 issues mentioned by roger on code reviewNick Mathewson
2010-09-12Handle null conn->requested_resource rather than assertRobert Hogan
Per arma's comments in bug1138
2010-09-12fix regression introduced by 1a65bdd2Roger Dingledine
noticed while reviewing hoganrobert/bug1138
2010-09-02Nick points out:Robert Hogan
tor_assert(!conn->_base.purpose == DIR_PURPOSE_FETCH_EXTRAINFO) != tor_assert(conn->_base.purpose != DIR_PURPOSE_FETCH_EXTRAINFO) !!
2010-09-02Amend per Sebastian's comments:Robert Hogan
- Move checks for extra_info to callers - Change argument name from failed to descs - Use strlen("fp/") instead of a magic number - I passed on the suggestion to rename functions from *_failed() to *_handle_failure(). There are a lot of these so for now just follow the house style.
2010-09-02Complicate the rules on WARN vs INFO in consensus verificationNick Mathewson
It's normal when bootstrapping to have a lot of different certs missing, so we don't want missing certs to make us warn... unless the certs we're missing are ones that we've tried to fetch a couple of times and failed at. May fix bug 1145.
2010-08-16Fall back to direct descriptor request to bridges whenRobert Hogan
requests to authorities fail due to a network error. Bug#1138 "When a Tor client starts up using a bridge, and UpdateBridgesFromAuthority is set, Tor will go to the authority first and look up the bridge by fingerprint. If the bridge authority is filtered, Tor will never notice that the bridge authority lookup failed. So it will never fall back." Add connection_dir_bridge_routerdesc_failed(), a function for unpacking the bridge information from a failed request, and ensure connection_dir_request_failed() calls it if the failed request was for a bridge descriptor. Test: 1. for ip in `grep -iR 'router ' cached-descriptors|cut -d ' ' -f 3`; do sudo iptables -A OUTPUT -p tcp -d $ip -j DROP; done 2. remove all files from user tor directory 3. Put the following in torrc: UseBridges 1 UpdateBridgesFromAuthority 1 Bridge 85.108.88.19:443 7E1B28DB47C175392A0E8E4A287C7CB8686575B7 4. Launch tor - it should fall back to downloading descriptors directly from the bridge. Initial patch reviewed and corrected by mingw-san.
2010-07-27Create routerparse.hSebastian Hahn
2010-07-27Create rephist.hSebastian Hahn
2010-07-27Create policies.hSebastian Hahn
2010-07-27Create networkstatus.hSebastian Hahn
2010-07-27Create main.hSebastian Hahn
2010-07-27Create dirvote.hSebastian Hahn
2010-07-27Create dirserv.hSebastian Hahn
2010-07-27Create directory.hSebastian Hahn
2010-07-27Create control.hSebastian Hahn
2010-07-27Create connection_edge.hSebastian Hahn
2010-07-27Create connection.hSebastian Hahn
2010-07-27Create config.hSebastian Hahn
2010-07-27Create circuitbuild.hSebastian Hahn
2010-07-27Create buffers.hSebastian Hahn
2010-07-27Create rendclient.hSebastian Hahn
2010-07-27Create rendcommon.hSebastian Hahn
2010-07-27Create routerlist.hSebastian Hahn
2010-07-27Create router.hSebastian Hahn
2010-07-27Create geoip.hSebastian Hahn