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

[or-cvs] make normal exit nodes less likely to crash from the conn-m...



Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or

Modified Files:
	dns.c 
Log Message:
make normal exit nodes less likely to crash from the conn-munging bug
but leave dirservers just as likely to crash


Index: dns.c
===================================================================
RCS file: /home/or/cvsroot/src/or/dns.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- dns.c	28 Mar 2004 21:16:52 -0000	1.70
+++ dns.c	29 Mar 2004 19:51:39 -0000	1.71
@@ -113,14 +113,15 @@
   uint32_t now = time(NULL);
   assert_connection_ok(exitconn, 0);
 
-#if 0 /* only enable this once we've found the conn-munging bug */
-  /* first check if exitconn->address is an IP. If so, we already
-   * know the answer. */
-  if (tor_inet_aton(exitconn->address, &in) != 0) {
-    exitconn->addr = ntohl(in.s_addr);
-    return 1;
+  /* XXX leave disabled for dirservers so we can find the conn-munging bug */
+  if(!options.DirPort) {
+    /* first check if exitconn->address is an IP. If so, we already
+     * know the answer. */
+    if (tor_inet_aton(exitconn->address, &in) != 0) {
+      exitconn->addr = ntohl(in.s_addr);
+      return 1;
+    }
   }
-#endif
 
   /* then take this opportunity to see if there are any expired
    * resolves in the tree. */