diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/or/addressmap.c | 2 | ||||
-rw-r--r-- | src/or/config.c | 9 | ||||
-rw-r--r-- | src/or/or.h | 5 |
3 files changed, 5 insertions, 11 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); diff --git a/src/or/config.c b/src/or/config.c index 892108278e..b047b12717 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -3398,15 +3398,6 @@ options_validate(or_options_t *old_options, or_options_t *options, AF_INET6, 1, msg)<0) return -1; - if (options->AutomapHostsSuffixes) { - SMARTLIST_FOREACH(options->AutomapHostsSuffixes, char *, suf, - { - size_t len = strlen(suf); - if (len && suf[len-1] == '.') - suf[len-1] = '\0'; - }); - } - if (options->TestingTorNetwork && !(options->DirAuthorities || (options->AlternateDirAuthority && diff --git a/src/or/or.h b/src/or/or.h index 1609587717..66d10ac436 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -3646,8 +3646,9 @@ typedef struct { * hostname ending with one of the suffixes in * <b>AutomapHostsSuffixes</b>, map it to a * virtual address. */ - smartlist_t *AutomapHostsSuffixes; /**< List of suffixes for - * <b>AutomapHostsOnResolve</b>. */ + /** List of suffixes for <b>AutomapHostsOnResolve</b>. The special value + * "." means "match everything." */ + smartlist_t *AutomapHostsSuffixes; int RendPostPeriod; /**< How often do we post each rendezvous service * descriptor? Remember to publish them independently. */ int KeepalivePeriod; /**< How often do we send padding cells to keep |