diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-11-14 10:09:06 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-11-14 23:16:40 -0500 |
commit | 363cf024553741524c0c8cb9fa8b9226863c903b (patch) | |
tree | a5b2e300eafa5e01f5e17752c1d19f8425dea278 /src/or/config.c | |
parent | c4830bfbe2db333b6550d8b3e98868fa2c808b76 (diff) | |
download | tor-363cf024553741524c0c8cb9fa8b9226863c903b.tar tor-363cf024553741524c0c8cb9fa8b9226863c903b.tar.gz |
Implement a PreferIPv6 flag for SocksPorts
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/config.c b/src/or/config.c index 98fbb6e58..e069c7c52 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -4605,7 +4605,7 @@ parse_port_config(smartlist_t *out, int ok; int no_listen = 0, no_advertise = 0, all_addrs = 0, bind_ipv4_only = 0, bind_ipv6_only = 0, - ipv4_traffic = 1, ipv6_traffic = 0; + ipv4_traffic = 1, ipv6_traffic = 0, prefer_ipv6 = 0; smartlist_split_string(elts, ports->value, NULL, SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, 0); @@ -4737,6 +4737,9 @@ parse_port_config(smartlist_t *out, } else if (!strcasecmp(elt, "IPv6Traffic")) { ipv6_traffic = ! no; continue; + } else if (!strcasecmp(elt, "PreferIPv6")) { + prefer_ipv6 = ! no; + continue; } } @@ -4785,6 +4788,7 @@ parse_port_config(smartlist_t *out, cfg->bind_ipv6_only = bind_ipv6_only; cfg->ipv4_traffic = ipv4_traffic; cfg->ipv6_traffic = ipv6_traffic; + cfg->prefer_ipv6 = prefer_ipv6; smartlist_add(out, cfg); } |