aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-03-27 17:41:43 -0400
committerNick Mathewson <nickm@torproject.org>2014-03-27 17:41:43 -0400
commit46a3914079d6aa91ef456b4bb82d9f842feb0976 (patch)
treed5cdb8ade6274dd849387bea16773582094f5eff /src/or
parent24e0b1088acd94ceae3109107fa354b89309e2b7 (diff)
downloadtor-46a3914079d6aa91ef456b4bb82d9f842feb0976.tar
tor-46a3914079d6aa91ef456b4bb82d9f842feb0976.tar.gz
Respond to AAAA requests on DNSPort with AAAA automaps
Other DNS+IPv6 problems remain, but at least this fixes the automapping. Fixes bug 10468; bugfix on 0.2.4.7-alpha.
Diffstat (limited to 'src/or')
-rw-r--r--src/or/dnsserv.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/or/dnsserv.c b/src/or/dnsserv.c
index ebff7b524..4190e9cc2 100644
--- a/src/or/dnsserv.c
+++ b/src/or/dnsserv.c
@@ -131,6 +131,16 @@ evdns_server_callback(struct evdns_server_request *req, void *data_)
else
entry_conn->socks_request->command = SOCKS_COMMAND_RESOLVE_PTR;
+ if (q->type == EVDNS_TYPE_A) {
+ entry_conn->ipv4_traffic_ok = 1;
+ entry_conn->ipv6_traffic_ok = 0;
+ entry_conn->prefer_ipv6_traffic = 0;
+ } else if (q->type == EVDNS_TYPE_AAAA) {
+ entry_conn->ipv4_traffic_ok = 0;
+ entry_conn->ipv6_traffic_ok = 1;
+ entry_conn->prefer_ipv6_traffic = 1;
+ }
+
strlcpy(entry_conn->socks_request->address, q->name,
sizeof(entry_conn->socks_request->address));