diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-05-31 23:40:35 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-05-31 23:40:35 +0000 |
commit | 3b4fa59b60fdb3efd98d860ba0304fda8888b379 (patch) | |
tree | 5f33ba4a2f24b60987b6fb5d2b1f882805bd37a6 /src/or/eventdns.c | |
parent | b1cd5892cb438754a878e473bf63bc3a40f8f171 (diff) | |
download | tor-3b4fa59b60fdb3efd98d860ba0304fda8888b379.tar.gz tor-3b4fa59b60fdb3efd98d860ba0304fda8888b379.zip |
r13117@catbus: nickm | 2007-05-31 19:40:32 -0400
Patch from Tup: treat RESOLVED_TYPE_ERROR_TRANSIENT as a SERVERFAILED, and RESOLVED_TYPE_ERROR as NOTEXIST. Generate transient/nontransient errors more sensibly. Set flags better on DNS replies.
svn:r10427
Diffstat (limited to 'src/or/eventdns.c')
-rw-r--r-- | src/or/eventdns.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/or/eventdns.c b/src/or/eventdns.c index a3bb3bf245..46735f28f0 100644 --- a/src/or/eventdns.c +++ b/src/or/eventdns.c @@ -962,8 +962,7 @@ request_parse(u8 *packet, int length, struct evdns_server_port *port, struct soc GET16(additional); if (flags & 0x8000) return -1; // Must not be an answer. - if (flags & 0x7800) return -1; // only standard queries are supported - flags &= 0x0300; // Only TC and RD get preserved. + flags &= 0x0110; // Only RD and CD get preserved. server_req = malloc(sizeof(struct server_request)); if (server_req == NULL) return -1; @@ -1001,6 +1000,13 @@ request_parse(u8 *packet, int length, struct evdns_server_port *port, struct soc server_req->port = port; port->refcnt++; + + // Only standard queries are supported. + if (flags & 0x7800) { + evdns_server_request_respond(&(server_req->base), DNS_ERR_NOTIMPL); + return -1; + } + port->user_callback(&(server_req->base), port->user_data); return 0; |