[or-cvs] r9430: Fix two assert bugs encountered when trying ipv6 lookups wit (in tor/trunk: . src/or)

nickm at seul.org nickm at seul.org
Sat Jan 27 05:15:58 UTC 2007


Author: nickm
Date: 2007-01-27 00:15:53 -0500 (Sat, 27 Jan 2007)
New Revision: 9430

Modified:
   tor/trunk/
   tor/trunk/ChangeLog
   tor/trunk/src/or/eventdns.c
Log:
 r11548 at catbus:  nickm | 2007-01-27 00:15:47 -0500
 Fix two assert bugs encountered when trying ipv6 lookups with eventdns code.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r11548] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2007-01-26 19:27:54 UTC (rev 9429)
+++ tor/trunk/ChangeLog	2007-01-27 05:15:53 UTC (rev 9430)
@@ -41,7 +41,7 @@
       an incorrect number of bytes. (Previously, we would ignore the
       extra bytes.)
     - Fix as-yet-unused reverse IPv6 lookup code so it sends nybbles
-      in the correct order.
+      in the correct order, and doesn't crash.
     - Free memory held in recently-completed DNS lookup attempts on exit.
       This was not a memory leak, but may have been hiding memory leaks.
     - Don't launch requests for descriptors unless we have networkstatuses

Modified: tor/trunk/src/or/eventdns.c
===================================================================
--- tor/trunk/src/or/eventdns.c	2007-01-26 19:27:54 UTC (rev 9429)
+++ tor/trunk/src/or/eventdns.c	2007-01-27 05:15:53 UTC (rev 9430)
@@ -669,6 +669,7 @@
 							   req->user_pointer);
 		else
 			req->user_callback(err, 0, 0, 0, NULL, req->user_pointer);
+		return;
 	}
 	assert(0);
 }
@@ -2416,7 +2417,7 @@
 
 static int
 search_request_new(int type, const char *const name, int flags, evdns_callback_type user_callback, void *user_arg) {
-	assert(type == TYPE_A);
+	assert(type == TYPE_A || type == TYPE_AAAA);
 	if ( ((flags & DNS_QUERY_NO_SEARCH) == 0) &&
 		 global_search_state &&
 		 global_search_state->num_domains) {



More information about the tor-commits mailing list