]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Print the correct address family in log printout.
authorLinus Nordberg <linus@torproject.org>
Tue, 18 Sep 2012 12:41:14 +0000 (14:41 +0200)
committerLinus Nordberg <linus@torproject.org>
Tue, 18 Sep 2012 12:41:14 +0000 (14:41 +0200)
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.

changes/6884 [new file with mode: 0644]
src/or/circuitbuild.c

diff --git a/changes/6884 b/changes/6884
new file mode 100644 (file)
index 0000000..90585dc
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfixes (client):
+    - Correct log printout about which address family is preferred
+      when connecting to a bridge with both an IPv4 and IPv6 OR port.
+      Fixes bug 6884.
index d4969239cbf471aac144274149b6bef282d57766..515312f0ead9a1cb133d0a0291cf215a83391b00 100644 (file)
@@ -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);
     }
   }