diff options
author | Roger Dingledine <arma@torproject.org> | 2005-04-29 18:52:05 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2005-04-29 18:52:05 +0000 |
commit | 729e7200955d0b361ca084a2d7cad56e1bca4b53 (patch) | |
tree | eb1f8a7ab9e77831f51100a5fec23c50f76c3e6b | |
parent | 3d2fbeb9794bebcd729edc0bdbfd20aedffd4b0d (diff) | |
download | tor-729e7200955d0b361ca084a2d7cad56e1bca4b53.tar.gz tor-729e7200955d0b361ca084a2d7cad56e1bca4b53.zip |
workaround for user error: some people were putting "Address " in their
torrc, and they had a buggy resolver that resolved " " to 0.0.0.0. Oops.
svn:r4150
-rw-r--r-- | src/or/config.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/or/config.c b/src/or/config.c index bfb59ac3e7..0f2e395242 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -951,7 +951,14 @@ resolve_my_address(const char *address, uint32_t *addr) tor_assert(addr); - if (address) { + /* workaround: some people were leaving "Address " in their torrc, + * and they had a buggy resolver that resolved " " to 0.0.0.0. Oops. + */ + if (address) + while (TOR_ISSPACE(*address)) + address++; + + if (address && *address) { strlcpy(hostname, address, sizeof(hostname)); } else { /* then we need to guess our address */ explicit_ip = 0; /* it's implicit */ |