diff options
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/config.c | 1 | ||||
-rw-r--r-- | src/or/dirserv.c | 7 | ||||
-rw-r--r-- | src/or/or.h | 1 |
3 files changed, 6 insertions, 3 deletions
diff --git a/src/or/config.c b/src/or/config.c index bfa8c7fad..87c9cc4bb 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -201,6 +201,7 @@ static config_var_t _option_vars[] = { V(AuthDirListBadExits, BOOL, "0"), V(AuthDirMaxServersPerAddr, UINT, "2"), V(AuthDirMaxServersPerAuthAddr,UINT, "5"), + V(AuthDirHasIPv6Connectivity, AUTOBOOL, "auto"), VAR("AuthoritativeDirectory", BOOL, AuthoritativeDir, "0"), V(AutomapHostsOnResolve, BOOL, "0"), V(AutomapHostsSuffixes, CSV, ".onion,.exit"), diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 4d6f93d18..6f1646954 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; } diff --git a/src/or/or.h b/src/or/or.h index a8ef4d97c..9474c00fa 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -3273,6 +3273,7 @@ typedef struct { int AuthDirMaxServersPerAuthAddr; /**< Do not permit more than this * number of servers per IP address shared * with an authority. */ + int AuthDirHasIPv6Connectivity; /**< Autoboolean: are we on IPv6? */ /** If non-zero, always vote the Fast flag for any relay advertising * this amount of capacity or more. */ |