[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[or-cvs] make servers tolerate the dns bug.
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home/arma/work/onion/cvs/src/or
Modified Files:
dns.c
Log Message:
make servers tolerate the dns bug.
Index: dns.c
===================================================================
RCS file: /home/or/cvsroot/src/or/dns.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- dns.c 4 Mar 2003 04:36:37 -0000 1.7
+++ dns.c 5 Apr 2003 19:53:45 -0000 1.8
@@ -540,7 +540,15 @@
return 0;
}
- assert(resolve->state == CACHE_STATE_PENDING);
+// assert(resolve->state == CACHE_STATE_PENDING);
+ /* XXX this is a bug which hasn't been found yet. Probably something
+ * about slaves answering questions when they're not supposed to, and
+ * reusing the old question.
+ */
+ if(resolve->state != CACHE_STATE_PENDING) {
+ log(LOG_ERR,"dns_found_answer(): BUG: resolve '%s' in state %d (not pending). Dropping.",question, resolve->state);
+ return 0;
+ }
resolve->answer = ntohl(answer);
if(valid)