aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLinus Nordberg <linus@torproject.org>2012-09-18 14:41:14 +0200
committerLinus Nordberg <linus@torproject.org>2012-09-18 14:41:14 +0200
commita989dbc3dcf2d5dd80b279084053fff3e94d124d (patch)
tree3281ff8a96f5858c11b9bb7f06587af24a699881 /src
parent5dfec9f8335d0fa954ff5423a41e3e249547fd8d (diff)
downloadtor-a989dbc3dcf2d5dd80b279084053fff3e94d124d.tar.gz
tor-a989dbc3dcf2d5dd80b279084053fff3e94d124d.zip
Print the correct address family in log printout.
Look at the address family of the preferred OR port rather than the node.ipv6_preferred flag since the logic has changed with new ClientUseIPv6 config option. Fixes ticket 6884.
Diffstat (limited to 'src')
-rw-r--r--src/or/circuitbuild.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index d4969239cb..515312f0ea 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -5641,7 +5641,7 @@ rewrite_node_address_for_bridge(const bridge_info_t *bridge, node_t *node)
"Bridge '%s' has both an IPv4 and an IPv6 address. "
"Will prefer using its %s address (%s:%d).",
ri->nickname,
- node->ipv6_preferred ? "IPv6" : "IPv4",
+ tor_addr_family(&ap.addr) == AF_INET6 ? "IPv6" : "IPv4",
fmt_addr(&ap.addr), ap.port);
}
}