Add new option ClientAutoIPv6ORPort to switch between IPv4 and IPv6 OR ports

This commit is contained in:
Neel Chauhan
2018-09-26 19:14:33 -04:00
committed by Nick Mathewson
parent c82163dff4
commit 822cb93cab
7 changed files with 37 additions and 2 deletions
+2 -1
View File
@@ -844,7 +844,8 @@ rewrite_node_address_for_bridge(const bridge_info_t *bridge, node_t *node)
}
}
if (options->ClientPreferIPv6ORPort == -1) {
if (options->ClientPreferIPv6ORPort == -1 ||
options->ClientAutoIPv6ORPort == 0) {
/* 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));