diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-11-05 13:26:29 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-11-14 23:16:25 -0500 |
commit | 2889bd2642ada3a2aa55fa4909825dfb7e90812e (patch) | |
tree | 82321c86f51feffd3b6d8cec3902e6a24ad92237 /src/or/or.h | |
parent | a58e17bcc308654b7e973debe88fe74ad817a2bb (diff) | |
download | tor-2889bd2642ada3a2aa55fa4909825dfb7e90812e.tar.gz tor-2889bd2642ada3a2aa55fa4909825dfb7e90812e.zip |
Revise the DNS subsystem to handle IPv6 exits.
Now, every cached_resolve_t can remember an IPv4 result *and* an IPv6
result. As a light protection against timing-based distinguishers for
IPv6 users (and against complexity!), every forward request generates
an IPv4 *and* an IPv6 request, assuming that we're an IPv6 exit. Once
we have answers or errors for both, we act accordingly.
This patch additionally makes some useful refactorings in the dns.c
code, though there is quite a bit more of useful refactoring that could
be done.
Additionally, have a new interface for the argument passed to the
evdns_callback function. Previously, it was just the original address
we were resolving. But it turns out that, on error, evdns doesn't
tell you the type of the query, so on a failure we didn't know whether
IPv4 or IPv6 queries were failing.
The new convention is to have the first byte of that argument include
the query type. I've refactored the code a bit to make that simpler.
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/or.h b/src/or/or.h index c863edbf21..f22c7dffba 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -1440,6 +1440,8 @@ typedef struct edge_connection_t { /** True iff this connection is for a DNS request only. */ unsigned int is_dns_request:1; + /* DOCDOC exit only */ + unsigned int is_reverse_dns_lookup:1; unsigned int edge_has_sent_end:1; /**< For debugging; only used on edge * connections. Set once we've set the stream end, |