diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-10-14 08:48:59 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-10-14 08:48:59 +0000 |
commit | 2e11f7d9dd82b68d9d37fe54a3ddaa8df7fee27b (patch) | |
tree | 352518b5e01d33e971b03c07066d7fff5a828a24 | |
parent | 05053561b92fc457f72c40cae5225a7b3c524d04 (diff) | |
download | tor-2e11f7d9dd82b68d9d37fe54a3ddaa8df7fee27b.tar.gz tor-2e11f7d9dd82b68d9d37fe54a3ddaa8df7fee27b.zip |
r15764@catbus: nickm | 2007-10-14 04:43:10 -0400
Backport r11829: Downgrade warning that caused bug 463; comment; resolve.
svn:r11929
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | doc/TODO.012 | 2 | ||||
-rw-r--r-- | src/or/dns.c | 14 |
3 files changed, 16 insertions, 3 deletions
@@ -40,6 +40,9 @@ Changes in version 0.1.2.18 - 2007-??-?? key from getting rotated. - On some platforms, accept() can return a broken address. Detect this more quietly, and deal accordingly. (Fixes bug 483.) + - It's not actually an error to find a non-pending entry in the DNS + cache when canceling a pending resolve. Don't log unless stuff + is fishy. Resolves bug 463. Changes in version 0.1.2.17 - 2007-08-30 diff --git a/doc/TODO.012 b/doc/TODO.012 index 01fe212b10..7f343dc555 100644 --- a/doc/TODO.012 +++ b/doc/TODO.012 @@ -14,6 +14,6 @@ P - r10579: new addsysuser implementation for osx (??) (this will break some existing test-network configurations, yes?) o r11499, r11500, r11501: hidserv hexdigests rather than nicknames P - r11548, the osx /tmp fix -N - r11829: Don't warn when cancel_pending_resolve() finds a cached failure. + o r11829: Don't warn when cancel_pending_resolve() finds a cached failure. R - r11915: just because you hup, don't publish a near-duplicate descriptor diff --git a/src/or/dns.c b/src/or/dns.c index 037805a9e8..0bcd021e93 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -839,9 +839,19 @@ dns_cancel_pending_resolve(const char *address) strlcpy(search.address, address, sizeof(search.address)); resolve = HT_FIND(cache_map, &cache_root, &search); - if (!resolve || resolve->state != CACHE_STATE_PENDING) { - log_notice(LD_BUG,"Address %s is not pending. Dropping.", + if (!resolve) + return; + + if (resolve->state != CACHE_STATE_PENDING) { + /* We can get into this state if we never actually created the pending + * resolve, due to finding an earlier cached error or something. Just + * ignore it. */ + if (resolve->pending_connections) { + log_warn(LD_BUG, + "Address %s is not pending but has pending connections!", escaped_safe_str(address)); + tor_fragile_assert(); + } return; } |