diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-11-25 14:31:35 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-12-17 14:50:55 -0500 |
commit | 963b3d15492c6cda3feac6efcff768913352ac2c (patch) | |
tree | cb64e60f1151894ce8971ce1ff16f57916e7e3f6 /src/or/connection_edge.c | |
parent | 88d7312ff29cda982f928caf3ddab4df189b245c (diff) | |
download | tor-963b3d15492c6cda3feac6efcff768913352ac2c.tar.gz tor-963b3d15492c6cda3feac6efcff768913352ac2c.zip |
Refactor the code to check if an address is matched by automapsuffixes
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 3207f588ec..9ccf58e5c8 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -928,12 +928,8 @@ connection_ap_handshake_rewrite_and_attach(entry_connection_t *conn, if (socks->command == SOCKS_COMMAND_RESOLVE && !tor_inet_aton(socks->address, &addr_tmp) && - options->AutomapHostsOnResolve && options->AutomapHostsSuffixes) { - SMARTLIST_FOREACH(options->AutomapHostsSuffixes, const char *, cp, - if (!strcasecmpend(socks->address, cp)) { - automap = 1; - break; - }); + options->AutomapHostsOnResolve) { + automap = addressmap_address_should_automap(socks->address, options); if (automap) { const char *new_addr; new_addr = addressmap_register_virtual_address( |