commit 707076002d4db2b8b2e6f05bea86316674bf9f45
parent 94c59851df353442ca5e56119ae4b0affa630e56
Author: Nick Mathewson <nickm@torproject.org>
Date: Tue, 2 Jan 2018 10:10:28 -0500
Merge branch 'maint-0.3.1' into maint-0.3.2
Diffstat:
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/changes/bug24736 b/changes/bug24736
@@ -0,0 +1,6 @@
+ o Minor bugfixes (address selection):
+ - When the fascist_firewall_choose_address_ functions don't find a
+ reachable address, set the returned address to the null address and port.
+ This is a precautionary measure, because some callers do not check the
+ return value.
+ Fixes bug 24736; bugfix on 0.2.8.2-alpha.
diff --git a/src/or/policies.c b/src/or/policies.c
@@ -865,6 +865,8 @@ fascist_firewall_choose_address_base(const tor_addr_t *ipv4_addr,
ap->port = result->port;
return 1;
} else {
+ tor_addr_make_null(&ap->addr, AF_UNSPEC);
+ ap->port = 0;
return 0;
}
}