summaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-11-25 14:51:36 -0500
committerNick Mathewson <nickm@torproject.org>2012-12-17 14:51:30 -0500
commit8d080d0b01f61c282ca8843801f2ebc8ae98c764 (patch)
tree2607cd2b36d89d15bebadaa8f3a88ce6f3e000d6 /src/or/connection.c
parentde4cc126cbb5e663bdd048fd782fde869be7b80a (diff)
downloadtor-8d080d0b01f61c282ca8843801f2ebc8ae98c764.tar.gz
tor-8d080d0b01f61c282ca8843801f2ebc8ae98c764.zip
Per-listener option to prefer IPv6 automaps when possible.
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 1395d3ebd7..740462e7c6 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -1134,6 +1134,7 @@ connection_listener_new(const struct sockaddr *listensockaddr,
lis_conn->cache_ipv6_answers = port_cfg->cache_ipv6_answers;
lis_conn->use_cached_ipv4_answers = port_cfg->use_cached_ipv4_answers;
lis_conn->use_cached_ipv6_answers = port_cfg->use_cached_ipv6_answers;
+ lis_conn->prefer_ipv6_virtaddr = port_cfg->prefer_ipv6_virtaddr;
if (connection_add(conn) < 0) { /* no space, forget it */
log_warn(LD_NET,"connection_add for listener failed. Giving up.");
@@ -1376,6 +1377,8 @@ connection_init_accepted_conn(connection_t *conn,
listener->use_cached_ipv4_answers;
TO_ENTRY_CONN(conn)->use_cached_ipv6_answers =
listener->use_cached_ipv6_answers;
+ TO_ENTRY_CONN(conn)->prefer_ipv6_virtaddr =
+ listener->prefer_ipv6_virtaddr;
switch (TO_CONN(listener)->type) {
case CONN_TYPE_AP_LISTENER: