diff options
-rw-r--r-- | 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 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); } } |