diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-01-04 17:28:54 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-01-04 17:28:54 -0500 |
commit | 8ef6cdc39f047a7579858a6e23629c1c2718fc0a (patch) | |
tree | 57c354fe35b3f1055af1459955a939be582ea845 /src/or/addressmap.c | |
parent | 0872d8e3cf3281fc5831375252db9e39de12e927 (diff) | |
download | tor-8ef6cdc39f047a7579858a6e23629c1c2718fc0a.tar.gz tor-8ef6cdc39f047a7579858a6e23629c1c2718fc0a.zip |
Prevent changes to other options from removing . from AutomapHostsSuffixes
This happened because we changed AutomapHostsSuffixes to replace "."
with "", since a suffix of "" means "match everything." But our
option handling code for CSV options likes to remove empty entries
when it re-parses stuff.
Instead, let "." remain ".", and treat it specially when we're
checking for a match.
Fixes bug 12509; bugfix on 0.2.0.1-alpha.
Diffstat (limited to 'src/or/addressmap.c')
-rw-r--r-- | src/or/addressmap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/addressmap.c b/src/or/addressmap.c index 998770a3db..279132e97c 100644 --- a/src/or/addressmap.c +++ b/src/or/addressmap.c @@ -226,6 +226,8 @@ addressmap_address_should_automap(const char *address, return 0; SMARTLIST_FOREACH_BEGIN(suffix_list, const char *, suffix) { + if (!strcmp(suffix, ".")) + return 1; if (!strcasecmpend(address, suffix)) return 1; } SMARTLIST_FOREACH_END(suffix); |