summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@torproject.org>2012-10-12 00:45:31 -0700
committerNick Mathewson <nickm@torproject.org>2012-10-12 10:02:13 -0400
commit9c605ecb7eeb62823dcb2042a5fbfde835f98618 (patch)
treeaa06593445e6f71b28059216b3db611654691690
parent3a33b1fe3bd7ba4cb1fff73f97ee722a2b127db5 (diff)
downloadtor-9c605ecb7eeb62823dcb2042a5fbfde835f98618.tar.gz
tor-9c605ecb7eeb62823dcb2042a5fbfde835f98618.zip
Install correct incoming cell handlers on reachability testing channels
Fix for bug 7086.
-rw-r--r--src/or/dirserv.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index ac7b122e68..ec4ecfa426 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -10,6 +10,7 @@
#include "confparse.h"
#include "channel.h"
#include "channeltls.h"
+#include "command.h"
#include "connection.h"
#include "connection_or.h"
#include "control.h"
@@ -3398,6 +3399,7 @@ dirserv_should_launch_reachability_test(const routerinfo_t *ri,
void
dirserv_single_reachability_test(time_t now, routerinfo_t *router)
{
+ channel_t *chan = NULL;
node_t *node = NULL;
tor_addr_t router_addr;
(void) now;
@@ -3410,8 +3412,9 @@ dirserv_single_reachability_test(time_t now, routerinfo_t *router)
log_debug(LD_OR,"Testing reachability of %s at %s:%u.",
router->nickname, router->address, router->or_port);
tor_addr_from_ipv4h(&router_addr, router->addr);
- channel_tls_connect(&router_addr, router->or_port,
- router->cache_info.identity_digest);
+ chan = channel_tls_connect(&router_addr, router->or_port,
+ router->cache_info.identity_digest);
+ if (chan) command_setup_channel(chan);
/* Possible IPv6. */
if (get_options()->AuthDirHasIPv6Connectivity == 1 &&
@@ -3421,8 +3424,9 @@ dirserv_single_reachability_test(time_t now, routerinfo_t *router)
router->nickname,
tor_addr_to_str(addrstr, &router->ipv6_addr, sizeof(addrstr), 1),
router->ipv6_orport);
- channel_tls_connect(&router->ipv6_addr, router->ipv6_orport,
- router->cache_info.identity_digest);
+ chan = channel_tls_connect(&router->ipv6_addr, router->ipv6_orport,
+ router->cache_info.identity_digest);
+ if (chan) command_setup_channel(chan);
}
}