[tor-commits] [tor/master] Respond to AAAA requests on DNSPort with AAAA automaps
nickm at torproject.org
nickm at torproject.org
Wed Apr 2 01:51:26 UTC 2014
commit 46a3914079d6aa91ef456b4bb82d9f842feb0976
Author: Nick Mathewson <nickm at torproject.org>
Date: Thu Mar 27 17:41:43 2014 -0400
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.
---
changes/bug10468 | 4 ++++
src/or/dnsserv.c | 10 ++++++++++
2 files changed, 14 insertions(+)
diff --git a/changes/bug10468 b/changes/bug10468
new file mode 100644
index 0000000..128eb3a
--- /dev/null
+++ b/changes/bug10468
@@ -0,0 +1,4 @@
+ o Minor bugfixes:
+ - When using DNSPort and AutomapHostsOnResolve, respond to AAAA
+ requests with AAAA automapped answers. Fixes bug 10468; bugfix
+ on 0.2.4.7-alpha.
diff --git a/src/or/dnsserv.c b/src/or/dnsserv.c
index ebff7b5..4190e9c 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));
More information about the tor-commits
mailing list