summaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.c
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2011-11-29 15:25:04 +0100
committerNick Mathewson <nickm@torproject.org>2011-11-30 11:55:46 -0500
commit1dca559db8525e18336144535de1d2b2e77a41b2 (patch)
treea58cb78b421b49a850f931763432a9ac820c9afc /src/or/circuitbuild.c
parent32d10bdfb3a55fe3752f85a7937e1f3f5c7e2c56 (diff)
downloadtor-1dca559db8525e18336144535de1d2b2e77a41b2.tar.gz
tor-1dca559db8525e18336144535de1d2b2e77a41b2.zip
Warn user about client ignoring non-preferred IP address for a bridge.
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r--src/or/circuitbuild.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 6b7be6652d..7934a2e7ff 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -5183,6 +5183,20 @@ rewrite_node_address_for_bridge(const bridge_info_t *bridge, node_t *node)
protocol that the bridge address indicates. Last bridge
descriptor handled wins. */
ri->ipv6_preferred = tor_addr_family(&bridge->addr) == AF_INET6;
+
+ /* XXXipv6 we lack support for falling back to another address for
+ the same relay, warn the user */
+ if (!tor_addr_is_null(&ri->ipv6_addr))
+ {
+ tor_addr_port_t ap;
+ router_get_pref_orport(ri, &ap);
+ log_notice(LD_CONFIG,
+ "Bridge '%s' has both an IPv4 and an IPv6 address. "
+ "Will prefer using its %s address (%s:%d).",
+ ri->nickname,
+ ri->ipv6_preferred ? "IPv6" : "IPv4",
+ fmt_addr(&ap.addr), ap.port);
+ }
}
if (node->rs) {
routerstatus_t *rs = node->rs;