diff options
author | Linus Nordberg <linus@torproject.org> | 2012-09-19 17:12:22 +0200 |
---|---|---|
committer | Linus Nordberg <linus@torproject.org> | 2012-09-19 17:12:22 +0200 |
commit | 9c5ba489d32f8a95c784e00308955d550740c94a (patch) | |
tree | bb45943547fb132d49984970c417fef38d6cb95b /src/or/circuitbuild.c | |
parent | 0e0a16774261cf2f9f98ffe42ccd8aefe3a36a95 (diff) | |
download | tor-9c5ba489d32f8a95c784e00308955d550740c94a.tar.gz tor-9c5ba489d32f8a95c784e00308955d550740c94a.zip |
Set (and reset) node_t.ipv6_preferred for bridges based on Bridge lines.
We used to set it only when ClientPreferIPv6ORPort was set which seems
wrong.
Fixes one part of #6757.
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r-- | src/or/circuitbuild.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 09eef64eff..a92e56bf67 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -5654,15 +5654,9 @@ rewrite_node_address_for_bridge(const bridge_info_t *bridge, node_t *node) } } - /* Mark bridge as preferably connected to over IPv6 if its IPv6 - address is in a Bridge line and ClientPreferIPv6ORPort is - set. Unless both is true, a potential IPv6 OR port of this - bridge won't get selected. - - XXX ipv6_preferred is never reset (#6757) */ - if (get_options()->ClientPreferIPv6ORPort == 1 && - tor_addr_family(&bridge->addr) == AF_INET6) - node->ipv6_preferred = 1; + /* Mark which address to use based on which bridge_t we got. */ + node->ipv6_preferred = (tor_addr_family(&bridge->addr) == AF_INET6 && + !tor_addr_is_null(&node->ri->ipv6_addr)); /* XXXipv6 we lack support for falling back to another address for the same relay, warn the user */ |