summaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2012-05-28 14:41:04 +0200
committerLinus Nordberg <linus@torproject.org>2012-07-19 18:21:22 +0200
commit044da1bf0f3bf6299c33d837839ec80ca1966723 (patch)
tree4fc5ec65539d8115f867a5dca6ff6dffcae83531 /src/or/dirserv.c
parentcdef2b181a0a7690736132542fbc5307d5c38955 (diff)
downloadtor-044da1bf0f3bf6299c33d837839ec80ca1966723.tar.gz
tor-044da1bf0f3bf6299c33d837839ec80ca1966723.zip
Add configure option AuthDirHasIPv6Connectivity.
Implements enhancement 5974.
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 4d6f93d180..6f16469540 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -2470,11 +2470,12 @@ set_routerstatus_from_routerinfo(routerstatus_t *rs,
rs->dir_port = ri->dir_port;
if (authdir_mode_bridge(options) &&
!tor_addr_is_null(&ri->ipv6_addr) &&
- node->last_reachable6 >= now - REACHABLE_TIMEOUT) {
+ (options->AuthDirHasIPv6Connectivity == 0 ||
+ node->last_reachable6 >= now - REACHABLE_TIMEOUT)) {
/* We're a bridge authority (we're not ready for IPv6 relays in
the consensus quite yet). There's an IPv6 OR port and it's
- reachable so copy it to the routerstatus. FIXME: If we're not
- on IPv6, copy it regardless of reachability. */
+ reachable (or we know that we're not on IPv6) so copy it to the
+ routerstatus. */
tor_addr_copy(&rs->ipv6_addr, &ri->ipv6_addr);
rs->ipv6_orport = ri->ipv6_orport;
}