Commit afa95ca4 authored by Roger Dingledine's avatar Roger Dingledine
Browse files

make servers tolerate the dns bug.


svn:r223
parent cb584627
Loading
Loading
Loading
Loading
+9 −1
Changes for src/or/dns.c: 9 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -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)