Merge remote-tracking branch 'public/bug12509_025'

This commit is contained in:
Nick Mathewson
2015-01-06 14:15:08 -05:00
4 changed files with 9 additions and 11 deletions
+4
View File
@@ -0,0 +1,4 @@
o Minor bugfixes (automapping):
- Prevent changes to other optoins from removing the wildcard value "."
from "AutomapHostsSuffixes".
+2
View File
@@ -230,6 +230,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);
-9
View File
@@ -3530,15 +3530,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 &&
+3 -2
View File
@@ -3675,8 +3675,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