]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
don't attempt a resolve when the cached answer will do
authorRoger Dingledine <arma@torproject.org>
Wed, 16 Nov 2016 21:22:11 +0000 (16:22 -0500)
committerRoger Dingledine <arma@torproject.org>
Wed, 16 Nov 2016 21:22:11 +0000 (16:22 -0500)
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.

changes/bug20423 [new file with mode: 0644]
src/or/dirserv.c

diff --git a/changes/bug20423 b/changes/bug20423
new file mode 100644 (file)
index 0000000..32bdc3f
--- /dev/null
@@ -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.
+
index fd92522f923533300fa4d517b0c8977a2a928c87..34db06355b12b393e22ef9b7bb2936c99bafb169 100644 (file)
@@ -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);