[tor-commits] [tor/master] Print the correct address family in log printout.

nickm at torproject.org nickm at torproject.org
Tue Sep 18 19:55:26 UTC 2012


commit a989dbc3dcf2d5dd80b279084053fff3e94d124d
Author: Linus Nordberg <linus at torproject.org>
Date:   Tue Sep 18 14:41:14 2012 +0200

    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.
---
 changes/6884          |    4 ++++
 src/or/circuitbuild.c |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/changes/6884 b/changes/6884
new file mode 100644
index 0000000..90585dc
--- /dev/null
+++ b/changes/6884
@@ -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.
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index d496923..515312f 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);
     }
   }





More information about the tor-commits mailing list