diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-03-11 17:20:43 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-03-11 17:20:43 -0400 |
commit | 07e26005a6cb7e47f1f90fcf6a377dfaaaa56789 (patch) | |
tree | 995e5e2e2072f1ff15eb1e78dfa5c8f9cb15d18d /src/or/connection.c | |
parent | 051b1e8ac4114fb23904cdf8dead72d585904e0a (diff) | |
download | tor-07e26005a6cb7e47f1f90fcf6a377dfaaaa56789.tar.gz tor-07e26005a6cb7e47f1f90fcf6a377dfaaaa56789.zip |
Treat a changed IPv6 ORPort like an IPv4 one in retry_all_listeners()
Fix for bug 6026
Diffstat (limited to 'src/or/connection.c')
-rw-r--r-- | src/or/connection.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index c659e65fe5..5812d83163 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -2054,6 +2054,8 @@ retry_all_listeners(smartlist_t *replaced_conns, const or_options_t *options = get_options(); int retval = 0; const uint16_t old_or_port = router_get_advertised_or_port(options); + const uint16_t old_or_port_ipv6 = + router_get_advertised_or_port_by_af(options,AF_INET6); const uint16_t old_dir_port = router_get_advertised_dir_port(options, 0); SMARTLIST_FOREACH_BEGIN(get_connection_array(), connection_t *, conn) { @@ -2082,8 +2084,9 @@ retry_all_listeners(smartlist_t *replaced_conns, smartlist_free(listeners); - /* XXXprop186 should take all advertised ports into account */ if (old_or_port != router_get_advertised_or_port(options) || + old_or_port_ipv6 != router_get_advertised_or_port_by_af(options, + AF_INET6) || old_dir_port != router_get_advertised_dir_port(options, 0)) { /* Our chosen ORPort or DirPort is not what it used to be: the * descriptor we had (if any) should be regenerated. (We won't |