diff options
author | Roger Dingledine <arma@torproject.org> | 2003-04-05 19:53:45 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2003-04-05 19:53:45 +0000 |
commit | afa95ca47c06232f7395af0f7197eab61e1d91c3 (patch) | |
tree | f6603867e251ac3cda45ae2d5e0c1932cea1be22 /src/or/dns.c | |
parent | cb584627a42636a0b38646ccc6d6c90abd490c37 (diff) | |
download | tor-afa95ca47c06232f7395af0f7197eab61e1d91c3.tar.gz tor-afa95ca47c06232f7395af0f7197eab61e1d91c3.zip |
make servers tolerate the dns bug.
svn:r223
Diffstat (limited to 'src/or/dns.c')
-rw-r--r-- | src/or/dns.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/or/dns.c b/src/or/dns.c index 362afce16d..0de83775f5 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -540,7 +540,15 @@ static int dns_found_answer(char *question, uint32_t answer, uint32_t valid) { 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) |