[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] be safe: if you got a resolvefailed end cell but you"re not...
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] be safe: if you got a resolvefailed end cell but you"re not...
- From: arma@xxxxxxxx (Roger Dingledine)
- Date: Sun, 30 Jan 2005 16:46:44 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Sun, 30 Jan 2005 16:47:03 -0500
- Reply-to: or-dev@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/src/or
Modified Files:
relay.c
Log Message:
be safe: if you got a resolvefailed end cell but you're not an AP, bail.
Index: relay.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/relay.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- relay.c 17 Jan 2005 18:13:09 -0000 1.36
+++ relay.c 30 Jan 2005 21:46:42 -0000 1.37
@@ -538,6 +538,10 @@
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. */