[or-cvs] r8592: Fix bug in r8579: TrackHostExits .foo.bar implies TrackHostE (in tor/trunk: . src/or)

nickm at seul.org nickm at seul.org
Tue Oct 3 19:00:13 UTC 2006


Author: nickm
Date: 2006-10-03 15:00:12 -0400 (Tue, 03 Oct 2006)
New Revision: 8592

Modified:
   tor/trunk/
   tor/trunk/src/or/circuituse.c
Log:
 r8861 at totoro:  nickm | 2006-10-03 14:49:54 -0400
 Fix bug in r8579: TrackHostExits .foo.bar implies TrackHostExits foo.bar; also fix logic error.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/branches/verbose-nicknames [r8861] on 96637b51-b116-0410-a10e-9941ebb49b64

Modified: tor/trunk/src/or/circuituse.c
===================================================================
--- tor/trunk/src/or/circuituse.c	2006-10-03 19:00:07 UTC (rev 8591)
+++ tor/trunk/src/or/circuituse.c	2006-10-03 19:00:12 UTC (rev 8592)
@@ -1106,7 +1106,6 @@
 consider_recording_trackhost(edge_connection_t *conn, origin_circuit_t *circ)
 {
   int found_needle = 0;
-  char *str;
   or_options_t *options = get_options();
   size_t len;
   char *new_address;
@@ -1120,12 +1119,9 @@
 
   SMARTLIST_FOREACH(options->TrackHostExits, const char *, cp, {
     if (cp[0] == '.') { /* match end */
-      if (!strcasecmpend(conn->socks_request->address, cp)) {
-        if (str == conn->socks_request->address
-          || strcmp(str, &cp[1]) == 0) {
+      if (!strcasecmpend(conn->socks_request->address, cp) ||
+          !strcasecmp(conn->socks_request->address, &cp[1]))
           found_needle = 1;
-        }
-      }
     } else if (strcasecmp(cp, conn->socks_request->address) == 0) {
       found_needle = 1;
     }



More information about the tor-commits mailing list