summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--doc/TODO.0122
-rw-r--r--src/or/dns.c14
3 files changed, 16 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 0b3c7196ec..dc51605ec2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;
}