aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-11-14 10:09:06 -0500
committerNick Mathewson <nickm@torproject.org>2012-11-14 23:16:40 -0500
commit363cf024553741524c0c8cb9fa8b9226863c903b (patch)
treea5b2e300eafa5e01f5e17752c1d19f8425dea278 /src/or/connection.c
parentc4830bfbe2db333b6550d8b3e98868fa2c808b76 (diff)
downloadtor-363cf024553741524c0c8cb9fa8b9226863c903b.tar.gz
tor-363cf024553741524c0c8cb9fa8b9226863c903b.zip
Implement a PreferIPv6 flag for SocksPorts
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 89ac8f5e7c..ecfb8a930e 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -1118,6 +1118,7 @@ connection_listener_new(const struct sockaddr *listensockaddr,
if (type == CONN_TYPE_AP) {
lis_conn->socks_ipv4_traffic = port_cfg->ipv4_traffic;
lis_conn->socks_ipv6_traffic = port_cfg->ipv6_traffic;
+ lis_conn->socks_prefer_ipv6 = port_cfg->prefer_ipv6;
} else {
lis_conn->socks_ipv4_traffic = 1;
lis_conn->socks_ipv6_traffic = 1;
@@ -1357,6 +1358,7 @@ connection_init_accepted_conn(connection_t *conn,
TO_ENTRY_CONN(conn)->socks_request->listener_type = listener->base_.type;
TO_ENTRY_CONN(conn)->ipv4_traffic_ok = listener->socks_ipv4_traffic;
TO_ENTRY_CONN(conn)->ipv6_traffic_ok = listener->socks_ipv6_traffic;
+ TO_ENTRY_CONN(conn)->prefer_ipv6_traffic = listener->socks_prefer_ipv6;
switch (TO_CONN(listener)->type) {
case CONN_TYPE_AP_LISTENER:
conn->state = AP_CONN_STATE_SOCKS_WAIT;