[or-cvs] r16437: {tor} Make unspecified addresses also cause connection_is_rate_lim (in tor/trunk: . src/or)

nickm at seul.org nickm at seul.org
Tue Aug 5 20:28:04 UTC 2008


Author: nickm
Date: 2008-08-05 16:28:03 -0400 (Tue, 05 Aug 2008)
New Revision: 16437

Modified:
   tor/trunk/
   tor/trunk/src/or/connection.c
Log:
 r17645 at 31-33-44:  nickm | 2008-08-05 16:28:01 -0400
 Make unspecified addresses also cause connection_is_rate_limited to say 0.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r17645] on 49666b30-7950-49c5-bedf-9dc8f3168102

Modified: tor/trunk/src/or/connection.c
===================================================================
--- tor/trunk/src/or/connection.c	2008-08-05 20:18:28 UTC (rev 16436)
+++ tor/trunk/src/or/connection.c	2008-08-05 20:28:03 UTC (rev 16437)
@@ -1459,7 +1459,9 @@
 static int
 connection_is_rate_limited(connection_t *conn)
 {
-  if (conn->linked || tor_addr_is_internal(&conn->addr, 0))
+  if (conn->linked || /* internal connection */
+      tor_addr_family(&conn->addr) == AF_UNSPEC || /* no address */
+      tor_addr_is_internal(&conn->addr, 0)) /* internal address */
     return 0;
   else
     return 1;



More information about the tor-commits mailing list