summaryrefslogtreecommitdiff
path: root/src/feature/client/bridges.c
diff options
context:
space:
mode:
authorNeel Chauhan <neel@neelc.org>2018-09-26 19:14:33 -0400
committerNick Mathewson <nickm@torproject.org>2018-12-01 14:55:57 -0500
commit822cb93cab59e9735e2efda70bc88c47cc92c498 (patch)
tree6955f83f3f264ac0b53a4baf7172aa2385874a07 /src/feature/client/bridges.c
parentc82163dff468443d28b6d0c9b1253f7721eb3fdc (diff)
downloadtor-822cb93cab59e9735e2efda70bc88c47cc92c498.tar.gz
tor-822cb93cab59e9735e2efda70bc88c47cc92c498.zip
Add new option ClientAutoIPv6ORPort to switch between IPv4 and IPv6 OR ports
Diffstat (limited to 'src/feature/client/bridges.c')
-rw-r--r--src/feature/client/bridges.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/feature/client/bridges.c b/src/feature/client/bridges.c
index e8afb5a924..e3ed288415 100644
--- a/src/feature/client/bridges.c
+++ b/src/feature/client/bridges.c
@@ -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));