diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-10-03 19:00:12 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-10-03 19:00:12 +0000 |
commit | 4c10464e13f8da761222e6303cd1b05d864eebf1 (patch) | |
tree | c621451d78bc43d96c9d6fad044bd30d2a69e1bc /src/or | |
parent | 29fa9eb216d74f1ca31a6f08ffc36d51726c1a50 (diff) | |
download | tor-4c10464e13f8da761222e6303cd1b05d864eebf1.tar.gz tor-4c10464e13f8da761222e6303cd1b05d864eebf1.zip |
r8861@totoro: nickm | 2006-10-03 14:49:54 -0400
Fix bug in r8579: TrackHostExits .foo.bar implies TrackHostExits foo.bar; also fix logic error.
svn:r8592
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/circuituse.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c index 092208b637..c0c2245694 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -1106,7 +1106,6 @@ static void 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 @@ consider_recording_trackhost(edge_connection_t *conn, origin_circuit_t *circ) 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; } |