[or-cvs] r13464: Directory mirrors no longer include a guess at the client's (in tor/trunk: . src/or)

arma at seul.org arma at seul.org
Mon Feb 11 05:31:56 UTC 2008


Author: arma
Date: 2008-02-11 00:31:56 -0500 (Mon, 11 Feb 2008)
New Revision: 13464

Modified:
   tor/trunk/ChangeLog
   tor/trunk/src/or/directory.c
Log:
Directory mirrors no longer include a guess at the client's IP
address if the connection appears to be coming from the same /24
network; it was producing too many wrong guesses.


Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2008-02-11 01:52:24 UTC (rev 13463)
+++ tor/trunk/ChangeLog	2008-02-11 05:31:56 UTC (rev 13464)
@@ -1,7 +1,11 @@
-Changes in version 0.2.0.2-?? - 2008-02-??
+Changes in version 0.2.0.20-?? - 2008-02-??
   o Minor bugfixes:
     - Log the correct memory chunk sizes for empty RAM chunks in mempool.c
+    - Directory mirrors no longer include a guess at the client's IP
+      address if the connection appears to be coming from the same /24
+      network; it was producing too many wrong guesses.
 
+
 Changes in version 0.2.0.19-alpha - 2008-02-09
   o Major features:
     - Do not include recognizeable strings in the commonname part of

Modified: tor/trunk/src/or/directory.c
===================================================================
--- tor/trunk/src/or/directory.c	2008-02-11 01:52:24 UTC (rev 13463)
+++ tor/trunk/src/or/directory.c	2008-02-11 05:31:56 UTC (rev 13464)
@@ -1984,8 +1984,10 @@
     tor_snprintf(cp, sizeof(tmp)-(cp-tmp), "Content-Type: %s\r\n", type);
     cp += strlen(cp);
   }
-  if (!is_internal_IP(conn->_base.addr, 0)) {
-    /* Don't report the source address for a localhost/private connection. */
+  if (!is_local_IP(conn->_base.addr)) {
+    /* Don't report the source address for a nearby/private connection.
+     * Otherwise we tend to mis-report in cases where incoming ports are
+     * being forwarded to a Tor server running behind the firewall. */
     tor_snprintf(cp, sizeof(tmp)-(cp-tmp),
                  X_ADDRESS_HEADER "%s\r\n", conn->_base.address);
     cp += strlen(cp);



More information about the tor-commits mailing list