diff options
author | Linus Nordberg <linus@nordberg.se> | 2012-05-10 18:48:30 +0200 |
---|---|---|
committer | Linus Nordberg <linus@torproject.org> | 2012-07-19 18:21:21 +0200 |
commit | 7c80a4502ce3f0b6d95bf2cee134a89765894b74 (patch) | |
tree | 212f08c2e612c05e3630642665e41992a15fe942 /src/or/dirserv.c | |
parent | 6d99c51f15d664ff6b33957b1043c73448a72711 (diff) | |
download | tor-7c80a4502ce3f0b6d95bf2cee134a89765894b74.tar.gz tor-7c80a4502ce3f0b6d95bf2cee134a89765894b74.zip |
Include IPv6 OR ports in status documents only if we're a bridge authority.
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index abbc123f91..2d9387ee19 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -2468,11 +2468,13 @@ set_routerstatus_from_routerinfo(routerstatus_t *rs, strlcpy(rs->nickname, ri->nickname, sizeof(rs->nickname)); rs->or_port = ri->or_port; rs->dir_port = ri->dir_port; - if (!tor_addr_is_null(&ri->ipv6_addr) && + if (authdir_mode_bridge(options) && + !tor_addr_is_null(&ri->ipv6_addr) && node->last_reachable6 >= now - REACHABLE_TIMEOUT) { - /* 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. */ + /* 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. */ tor_addr_copy(&rs->ipv6_addr, &ri->ipv6_addr); rs->ipv6_orport = ri->ipv6_orport; } |