diff options
author | Roger Dingledine <arma@torproject.org> | 2016-11-16 16:22:11 -0500 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2016-11-16 16:22:11 -0500 |
commit | f12aad7f09a608a803b74315213f6f57c97737de (patch) | |
tree | 929b44a3e17d19f3067a862521167938c228aec2 | |
parent | 3bb40b213b26467df2604023ae29d915dc740128 (diff) | |
download | tor-f12aad7f09a608a803b74315213f6f57c97737de.tar.gz tor-f12aad7f09a608a803b74315213f6f57c97737de.zip |
don't attempt a resolve when the cached answer will do
For relays that don't know their own address, avoid attempting
a local hostname resolve for each descriptor we download. Also cut
down on the number of "Success: chose address 'x.x.x.x'" log lines.
Fixes bugs 20423 and 20610; bugfix on 0.2.8.1-alpha.
-rw-r--r-- | changes/bug20423 | 6 | ||||
-rw-r--r-- | src/or/dirserv.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/changes/bug20423 b/changes/bug20423 new file mode 100644 index 0000000000..32bdc3f081 --- /dev/null +++ b/changes/bug20423 @@ -0,0 +1,6 @@ + o Major bugfixes: + - For relays that don't know their own address, avoid attempting + a local hostname resolve for each descriptor we download. Also cut + down on the number of "Success: chose address 'x.x.x.x'" log lines. + Fixes bugs 20423 and 20610; bugfix on 0.2.8.1-alpha. + diff --git a/src/or/dirserv.c b/src/or/dirserv.c index fd92522f92..34db06355b 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -1034,7 +1034,7 @@ directory_fetches_from_authorities(const or_options_t *options) if (options->BridgeRelay == 1) return 0; if (server_mode(options) && - router_pick_published_address(options, &addr, 0) < 0) + router_pick_published_address(options, &addr, 1) < 0) return 1; /* we don't know our IP address; ask an authority. */ refuseunknown = ! router_my_exit_policy_is_reject_star() && should_refuse_unknown_exits(options); |