[or-cvs] if dns resolve is valid, but our exit policy rejects it or
Roger Dingledine
arma at seul.org
Fri Apr 9 21:06:16 UTC 2004
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
dns.c
Log Message:
if dns resolve is valid, but our exit policy rejects it or
the connect attempt fails immediately, we were trying to
double-remove it from the dns pending list.
i think this might have been The Bug.
(thanks weasel!)
Index: dns.c
===================================================================
RCS file: /home/or/cvsroot/src/or/dns.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- dns.c 9 Apr 2004 09:39:41 -0000 1.74
+++ dns.c 9 Apr 2004 21:06:14 -0000 1.75
@@ -376,9 +376,9 @@
pend = resolve->pending_connections;
assert_connection_ok(pend->conn,time(NULL));
pend->conn->addr = resolve->addr;
+ /* prevent double-remove */
+ pend->conn->state = EXIT_CONN_STATE_RESOLVEFAILED;
if(resolve->state == CACHE_STATE_FAILED) {
- /* prevent double-remove */
- pend->conn->state = EXIT_CONN_STATE_RESOLVEFAILED;
pendconn = pend->conn; /* don't pass complex things to the
connection_mark_for_close macro */
connection_mark_for_close(pendconn, END_STREAM_REASON_RESOLVEFAILED);
More information about the tor-commits
mailing list