summaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-09-08 11:54:24 -0400
committerNick Mathewson <nickm@torproject.org>2011-11-30 14:08:11 -0500
commit69d16900aaf1d54b44d2b28514a09873154c63d3 (patch)
treedae8d76b14f99e94af2291fab286dc47100a5710 /src/or/circuituse.c
parentdf0da3991cb00efdf7c9362e805877e63ce8a46e (diff)
downloadtor-69d16900aaf1d54b44d2b28514a09873154c63d3.tar.gz
tor-69d16900aaf1d54b44d2b28514a09873154c63d3.zip
Refactor addressmap_match_superdomains and representation of wildcards
In this new representation for wildcarded addresses, there are no longer any 'magic addresses': rather, "a.b c.d", "*.a.b c.d" and "*.a.b *.c.d" are all represented by a mapping from "a.b" to "c.d". we now distinguish them by setting bits in the addressmap_entry_t structure, where src_wildcard is set if the source address had a wildcard, and dst_wildcard is set if the target address had a wildcard. This lets the case where "*.a.b *.c.d" or "*.a.b c.d" remap the address "a.b" get handled trivially, and lets us simplify and improve the addressmap_match_superdomains implementation: we can now have it run in O(parts of address) rather than O(entries in addressmap).
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r--src/or/circuituse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index f7f080db13..fc252c9b18 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -1676,7 +1676,7 @@ consider_recording_trackhost(const entry_connection_t *conn,
addressmap_register(conn->socks_request->address, new_address,
time(NULL) + options->TrackHostExitsExpire,
- ADDRMAPSRC_TRACKEXIT);
+ ADDRMAPSRC_TRACKEXIT,0,0);
}
/** Attempt to attach the connection <b>conn</b> to <b>circ</b>, and send a