From: Roger Dingledine Date: Sun, 30 Jan 2005 21:46:42 +0000 (+0000) Subject: be safe: if you got a resolvefailed end cell but you're not an AP, bail. X-Git-Tag: tor-0.1.0.1-rc~371 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=20ecfc757be42e2aadde22584d3b7ca6548f3d02;p=thirdparty%2Ftor.git be safe: if you got a resolvefailed end cell but you're not an AP, bail. svn:r3469 --- diff --git a/src/or/relay.c b/src/or/relay.c index 0a2042d6a3..39ef56caa2 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -538,6 +538,10 @@ connection_edge_process_relay_cell_not_open( log_fn(LOG_INFO,"Giving up on retrying (from exitpolicy); conn can't be handled."); /* else, conn will get closed below */ } else if (rh->length && reason == END_STREAM_REASON_RESOLVEFAILED) { + if (conn->type != CONN_TYPE_AP) { + log_fn(LOG_WARN,"Got an end because of resolvefailed, but we're not an AP. Closing."); + return -1; + } if (client_dns_incr_failures(conn->socks_request->address) < MAX_RESOLVE_FAILURES) { /* We haven't retried too many times; reattach the connection. */