aboutsummaryrefslogtreecommitdiff
path: root/src/or/rendclient.c
Commit message (Collapse)AuthorAge
...
| * | Clear the timed_out flag when an HS connection attempt endsRobert Ransom2011-10-02
| | |
| * | Record intro point timeouts in rend_intro_point_tRobert Ransom2011-10-02
| | |
| * | Refetch an HS's desc if we don't have a usable oneRobert Ransom2011-10-02
| |/ | | | | | | | | | | | | | | | | | | | | | | Previously, we wouldn't refetch an HS's descriptor unless we didn't have one at all. That was equivalent to refetching iff we didn't have a usable one, but the next commit will make us keep some non-usable HS descriptors around in our cache. Code bugfix on the release that introduced the v2 HS directory system, because rend_client_refetch_v2_renddesc's documentation comment should have described what it actually did, not what its behaviour happened to be equivalent to; no behaviour change in this commit.
* | Move entry-only fields from edge_connection_t to entry_connection_tNick Mathewson2011-07-21
| | | | | | | | Also, refactor the code accordingly.
* | Fix bug in upload/download of hsdesc with microdescsNick Mathewson2011-07-15
| | | | | | | | | | | | | | | | Previously we were using router_get_by_id(foo) to test "do we have a descriptor that will let us make an anonymous circuit to foo". But that isn't right for microdescs: we should have been using node_t. Fixes bug 3601; bugfix on 0.2.3.1-alpha.
* | Kill redundant checks around routerset_contains_*()Nick Mathewson2011-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All of the routerset_contains*() functions return 0 if their routerset_t argument is NULL. Therefore, there's no point in doing "if (ExcludeNodes && routerset_contains*(ExcludeNodes...))", for example. This patch fixes every instance of if (X && routerstatus_contains*(X,...)) Note that there are other patterns that _aren't_ redundant. For example, we *don't* want to change: if (EntryNodes && !routerstatus_contains(EntryNodes,...)) Fixes #2797. No bug here; just needless code.
* | Merge remote-tracking branch 'rransom-tor/bug3332-v2'Nick Mathewson2011-06-15
|\ \
| * | Assert that HS operations are not performed using single-hop circuitsRobert Ransom2011-06-14
| | | | | | | | | | | | (with fixes by Nick Mathewson to unbreak the build)
* | | Make the get_options() return constNick Mathewson2011-06-14
|/ / | | | | | | | | | | | | | | This lets us make a lot of other stuff const, allows the compiler to generate (slightly) better code, and will make me get slightly fewer patches from folks who stick mutable stuff into or_options_t. const: because not every input is an output!
* | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-06-02
|\| | | | | | | | | Conflicts: src/or/rendclient.c
| * Add info-level log messages during HS-client-state purgeRobert Ransom2011-06-02
| | | | | | | | | | I hope these will never be useful, but having them and not needing them is better than needing them and not having them.
| * Refactor HS client state-clearing code into a separate functionRobert Ransom2011-06-02
| |
| * Clear last_hid_serv_requests on SIGNAL NEWNYMRobert Ransom2011-06-02
| | | | | | | | Fixes bug #3309.
| * Make last_hid_serv_requests functions less fragileRobert Ransom2011-06-02
| | | | | | | | | | | | | | | | Previously, Tor would dereference a NULL pointer and crash if lookup_last_hid_serv_request were called before the first call to directory_clean_last_hid_serv_requests. As far as I can tell, that's currently impossible, but I want that undocumented invariant to go away in case I^Wwe break it someday.
* | 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-30
|\| | | | | | | | | | | | | | Conflicts: src/or/circuituse.c
| * | Set timestamp_dirty on HS circuits as circuit_expire_building requiresRobert Ransom2011-05-30
| |/ | | | | | | | | | | Fixes part of #1297; bugfix on 48e0228f1e031a709c1deb149c7dfd187c3609cf, when circuit_expire_building was changed to assume that timestamp_dirty was set when a circuit changed purpose to _C_REND_READY. (It wasn't.)
* | 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-05
|\| |
| * | Fix up some check-spaces issuesNick Mathewson2011-05-05
| | |
* | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-04-28
|\| |
| * | Fix bug 1930Robert Ransom2011-04-28
| | |
* | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-04-28
|\| | | | | | | | | | | | | | Conflicts: src/or/rendcommon.h
| * | Clean up merge of bug3k_021Robert Ransom2011-04-28
| | |
| * | Merge branch 'bug3k_021' into bug3k_022Sebastian Hahn2011-04-28
| |\| | | | | | | | | | | | | | | | Conflicts: src/or/or.h src/or/rendclient.c
| | * Fix a bug introduced by purging rend_cache on NEWNYMRobert Ransom2011-04-28
| | | | | | | | | | | | | | | | | | | | | | | | If the user sent a SIGNAL NEWNYM command after we fetched a rendezvous descriptor, while we were building the introduction-point circuit, we would give up entirely on trying to connect to the hidden service. Original patch by rransom slightly edited to go into 0.2.1
| | * Allow rend_client_send_introduction to fail transientlyRobert Ransom2011-04-28
| | | | | | | | | | | | i.e. without closing the AP connection.
| | * Forget all rendezvous client state on SIGNAL NEWNYMRobert Ransom2011-04-28
| | |
* | | 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.
| * | explain an argument in a function commentRoger Dingledine2011-04-27
| | |
| * | Instead of checking whether we have unremoved intro points, check for usable ↵Nick Mathewson2011-04-27
| | | | | | | | | | | | ones
| * | refuse excluded hidserv nodes if strictnodesRoger Dingledine2011-04-26
| | | | | | | | | | | | | | | Make hidden services more flaky for people who set both ExcludeNodes and StrictNodes. Not recommended, especially for hidden service operators.
* | | 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
| * | 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 branch 'origin/maint-0.2.2'Nick Mathewson2011-03-15
|\| |
| * | Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-03-15
| |\|
| | * Fix a compile warning when using clangSebastian Hahn2011-03-15
| | | | | | | | | | | | | | | | | | Issue noticed by Steven Murdoch; fixes bug 2689. The cast didn't do anything, and we don't need to look at the return value of the function here.
| | * Merge remote branch 'public/bug1859_021' into maint-0.2.1Nick Mathewson2011-02-22
| | |\
| | | * Fix a remaining bug in Robert's bug1859 fix.Nick Mathewson2010-11-12
| | | | | | | | | | | | | | | | | | | | | | | | When intro->extend_info is created for an introduction point, it only starts out with a nickname, not necessarily an identity digest. Thus, doing router_get_by_digest isn't necessarily safe.
| | | * Issues with router_get_by_nickname()Robert Hogan2010-11-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://trac.torproject.org/projects/tor/ticket/1859 Use router_get_by_digest() instead of router_get_by_hexdigest() in circuit_discard_optional_exit_enclaves() and rend_client_get_random_intro(), per Nick's comments. Using router_get_by_digest() in rend_client_get_random_intro() will break hidden services published by Tor versions pre 0.1.2.18 and 0.2.07-alpha as they only publish by nickname. This is acceptable however as these versions only publish to authority tor26 and don't work for versions in the 0.2.2.x series anyway.
| | | * Issues with router_get_by_nickname()Robert Hogan2010-11-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://trac.torproject.org/projects/tor/ticket/1859 There are two problems in this bug: 1. When an OP makes a .exit request specifying itself as the exit, and the exit is not yet listed, Tor gets all the routerinfos needed for the circuit but discovers in circuit_is_acceptable() that its own routerinfo is not in the routerdigest list and cannot be used. Tor then gets locked in a cycle of repeating these two steps. When gathering the routerinfos for a circuit, specifically when the exit has been chosen by .exit notation, Tor needs to apply the same rules it uses later on when deciding if it can build a circuit with those routerinfos. 2. A different bug arises in the above situation when the Tor instance's routerinfo *is* listed in the routerlist, it shares its nickname with a number of other Tor nodes, and it does not have 'Named' rights to its nickname. So for example, if (i) there are five nodes named Bob in the network, (ii) I am running one of them but am flagged as 'Unnamed' because someone else claimed the 'Bob' nickname first, and (iii) I run my Tor as both client and exit the following can happen to me: - I go to www.evil.com - I click on a link www.evil.com.bob.exit - My request will exit through my own Tor node rather than the 'Named' node Bob or any of the others. - www.evil.com now knows I am actually browsing from the same computer that is running my 'Bob' node So to solve both issues we need to ensure: - When fulfilling a .exit request we only choose a routerinfo if it exists in the routerlist, even when that routerinfo is ours. - When getting a router by nickname we only return our own router information if it is not going to be used for building a circuit. We ensure this by removing the special treatment afforded our own router in router_get_by_nickname(). This means the function will only return the routerinfo of our own router if it is in the routerlist built from authority info and has a unique nickname or is bound to a non-unique nickname. There are some uses of router_get_by_nickname() where we are looking for the router by name because of a configuration directive, specifically local declaration of NodeFamilies and EntryNodes and other routers' declaration of MyFamily. In these cases it is not at first clear if we need to continue returning our own routerinfo even if our router is not listed and/or has a non-unique nickname with the Unnamed flag. The patch treats each of these cases as follows: Other Routers' Declaration of MyFamily This happens in routerlist_add_family(). If another router declares our router in its family and our router has the Unnamed flag or is not in the routerlist yet, should we take advantage of the fact that we know our own routerinfo to add us in anyway? This patch says 'no, treat our own router just like any other'. This is a safe choice because it ensures our client has the same view of the network as other clients. We also have no good way of knowing if our router is Named or not independently of the authorities, so we have to rely on them in this. Local declaration of NodeFamilies Again, we have no way of knowing if the declaration 'NodeFamilies Bob,Alice,Ringo' refers to our router Bob or the Named router Bob, so we have to defer to the authorities and treat our own router like any other. Local declaration of NodeFamilies Again, same as above. There's also no good reason we would want our client to choose it's own router as an entry guard if it does not meet the requirements expected of any other router on the network. In order to reduce the possibility of error, the patch also replaces two instances where we were using router_get_by_nickname() with calls to router_get_by_hexdigest() where the identity digest of the router is available.
| | * | Make the DH parameter we use for TLS match the one from Apache's mod_sslNick Mathewson2011-02-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our regular DH parameters that we use for circuit and rendezvous crypto are unchanged. This is yet another small step on the path of protocol fingerprinting resistance. (Backport from 0.2.2's 5ed73e3807d90dd0a3)
* | | | another api tweak to help task 1944Roger Dingledine2011-02-07
| | | |
* | | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-01-24
|\| | |
| * | | Make the DH parameter we use for TLS match the one from Apache's mod_sslNick Mathewson2011-01-24
| | | | | | | | | | | | | | | | | | | | | | | | Our regular DH parameters that we use for circuit and rendezvous crypto are unchanged. This is yet another small step on the path of protocol fingerprinting resistance.