[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Install correct incoming cell handlers on reachability testing channels
commit 9c605ecb7eeb62823dcb2042a5fbfde835f98618
Author: Andrea Shepard <andrea@xxxxxxxxxxxxxx>
Date: Fri Oct 12 00:45:31 2012 -0700
Install correct incoming cell handlers on reachability testing channels
Fix for bug 7086.
---
src/or/dirserv.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index ac7b122..ec4ecfa 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);
}
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits