diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-02-25 07:31:46 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-02-25 07:31:46 +0000 |
commit | 496e414e5208fe4c196a645e2f64ba712d893f6e (patch) | |
tree | 50778a6e14363e60bd61d292be1e08eee2133693 /src/or/dns.c | |
parent | 1b25794a56654e115fa46ac9bfc6334753f6dda1 (diff) | |
download | tor-496e414e5208fe4c196a645e2f64ba712d893f6e.tar.gz tor-496e414e5208fe4c196a645e2f64ba712d893f6e.zip |
Basic RAM poisoning and magic-checking to notice connection and circuit
corruption faster; also, check for corruption in dns.c so we can fail fast
for the bug that's nailing Lucky and moria3.
svn:r1123
Diffstat (limited to 'src/or/dns.c')
-rw-r--r-- | src/or/dns.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/dns.c b/src/or/dns.c index 7ce806480c..f8aa7e0f07 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -99,6 +99,7 @@ int dns_resolve(connection_t *exitconn) { struct cached_resolve search; struct pending_connection_t *pending_connection; uint32_t now = time(NULL); + assert_connection_ok(exitconn, 0); /* first take this opportunity to see if there are any expired resolves in the tree.*/ @@ -206,6 +207,7 @@ void dns_cancel_pending_resolve(char *address, connection_t *onlyconn) { assert(resolve->pending_connections); if(onlyconn) { + assert_connection_ok(onlyconn,0); pend = resolve->pending_connections; if(pend->conn == onlyconn) { resolve->pending_connections = pend->next; @@ -297,6 +299,7 @@ static void dns_found_answer(char *address, uint32_t addr) { while(resolve->pending_connections) { pend = resolve->pending_connections; + assert_connection_ok(pend->conn,0); pend->conn->addr = resolve->addr; if(resolve->state == CACHE_STATE_FAILED) { if(connection_edge_end(pend->conn, END_STREAM_REASON_RESOLVEFAILED, NULL) < 0) |