aboutsummaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-03-04 18:37:40 -0500
committerNick Mathewson <nickm@torproject.org>2010-03-04 18:37:40 -0500
commit3ff092391b065561da339dc05614beb4e586a4d8 (patch)
tree5bc71a75744eff4b49bdae031142e57419b447e7 /src/or/config.c
parent404af59ed553e7c1f4cef6668b6832e0bd1a8956 (diff)
downloadtor-3ff092391b065561da339dc05614beb4e586a4d8.tar.gz
tor-3ff092391b065561da339dc05614beb4e586a4d8.zip
Apply Roger's bug 1269 fix.
From http://archives.seul.org/tor/relays/Mar-2010/msg00006.html : As I understand it, the bug should show up on relays that don't set Address to an IP address (so they need to resolve their Address line or their hostname to guess their IP address), and their hostname or Address line fails to resolve -- at that point they'll pick a random 4 bytes out of memory and call that their address. At the same time, relays that *do* successfully resolve their address will ignore the result, and only come up with a useful address if their interface address happens to be a public IP address.
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/config.c b/src/or/config.c
index c7c1e19bcb..26e42e7009 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -2367,7 +2367,7 @@ resolve_my_address(int warn_severity, or_options_t *options,
if (tor_inet_aton(hostname, &in) == 0) {
/* then we have to resolve it */
explicit_ip = 0;
- if(!tor_lookup_hostname(hostname, &addr)) {
+ if (tor_lookup_hostname(hostname, &addr)) {
uint32_t interface_ip;
if (explicit_hostname) {