[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r9468: Re-enable server side PTR-record cacheing. (in tor/trunk: . doc src/or)



Author: nickm
Date: 2007-01-30 19:58:06 -0500 (Tue, 30 Jan 2007)
New Revision: 9468

Modified:
   tor/trunk/
   tor/trunk/ChangeLog
   tor/trunk/doc/TODO
   tor/trunk/src/or/dns.c
Log:
 r11613@catbus:  nickm | 2007-01-30 19:58:03 -0500
 Re-enable server side PTR-record cacheing.



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

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2007-01-30 22:44:24 UTC (rev 9467)
+++ tor/trunk/ChangeLog	2007-01-31 00:58:06 UTC (rev 9468)
@@ -85,6 +85,7 @@
       ready yet. As part of the change, now assume we can use a
       create_fast cell if we don't know anything about a router.
     - Allow exit nodes to use nameservers running on ports other than 53.
+    - Servers now cache reverse DNS replies.
 
   o Minor features (controller):
     - Track reasons for OR connection failure; make these reasons

Modified: tor/trunk/doc/TODO
===================================================================
--- tor/trunk/doc/TODO	2007-01-30 22:44:24 UTC (rev 9467)
+++ tor/trunk/doc/TODO	2007-01-31 00:58:06 UTC (rev 9468)
@@ -71,7 +71,7 @@
       - Make evdns use windows strerror equivalents.
       . Make sure patches get into libevent.
       - Verify that it works well on windows
-    - Debug and re-enable server-side reverse DNS caching
+    o Debug and re-enable server-side reverse DNS caching
 
   - Critical but minor bugs, backport candidates.
     - support dir 503s better

Modified: tor/trunk/src/or/dns.c
===================================================================
--- tor/trunk/src/or/dns.c	2007-01-30 22:44:24 UTC (rev 9467)
+++ tor/trunk/src/or/dns.c	2007-01-31 00:58:06 UTC (rev 9468)
@@ -499,6 +499,7 @@
   size_t buflen;
   uint32_t ttl;
   size_t namelen = strlen(hostname);
+  tor_assert(hostname);
 
   tor_assert(namelen < 256);
   ttl = dns_clip_ttl(conn->address_ttl);
@@ -902,11 +903,6 @@
   if (outcome == DNS_RESOLVE_FAILED_TRANSIENT)
     return;
 
-  /* XXXX012 This is dumb, but it seems to workaround a bug I can't find.  We
-   * should nail this so we can cache reverse DNS answers. -NM */
-  if (is_reverse)
-    return;
-
   //log_notice(LD_EXIT, "Adding to cache: %s -> %s (%lx, %s), %d",
   //           address, is_reverse?"(reverse)":"", (unsigned long)addr,
   //           hostname?hostname:"NULL",(int)outcome);