summaryrefslogtreecommitdiff
path: root/src/or/dnsserv.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-10-26 12:52:34 -0400
committerNick Mathewson <nickm@torproject.org>2016-10-26 14:16:40 -0400
commitd28870402376c52b32feaebfcbe190873218fb89 (patch)
tree479b4e4b33d912895897798202aef72dabd70a5e /src/or/dnsserv.c
parent9a3adb07c49a522ffbefb009687c3bd9ee282d59 (diff)
downloadtor-d28870402376c52b32feaebfcbe190873218fb89.tar.gz
tor-d28870402376c52b32feaebfcbe190873218fb89.zip
Avoid tor_fragile_assert() failure with DNSPort on RESOLVED_TYPE_ERROR
The tor_fragile_assert() bug has existed here since c8a5e2d588e0d91 in tor-0.2.1.7-alpha forever, but tor_fragile_assert() was mostly a no-op until 0.2.9.1-alpha. Fixes bug 19869.
Diffstat (limited to 'src/or/dnsserv.c')
-rw-r--r--src/or/dnsserv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/dnsserv.c b/src/or/dnsserv.c
index 04be3e8a6a..f5a4f2ac0f 100644
--- a/src/or/dnsserv.c
+++ b/src/or/dnsserv.c
@@ -290,6 +290,10 @@ evdns_get_orig_address(const struct evdns_server_request *req,
case RESOLVED_TYPE_IPV6:
type = EVDNS_TYPE_AAAA;
break;
+ case RESOLVED_TYPE_ERROR:
+ case RESOLVED_TYPE_ERROR_TRANSIENT:
+ /* Addr doesn't matter, since we're not sending it back in the reply.*/
+ return addr;
default:
tor_fragile_assert();
return addr;