diff options
author | teor <teor2345@gmail.com> | 2017-12-25 01:53:14 +1100 |
---|---|---|
committer | teor <teor2345@gmail.com> | 2017-12-25 01:55:28 +1100 |
commit | 09b9a35c07a35c0891f8cb10406c113155740d18 (patch) | |
tree | defb893ddc0c48e5919adc979a2a4f4d96d3d26b /src/or/policies.c | |
parent | 7d845976e3897fac8e78a4a26688ac57b660151b (diff) | |
download | tor-09b9a35c07a35c0891f8cb10406c113155740d18.tar.gz tor-09b9a35c07a35c0891f8cb10406c113155740d18.zip |
Clear the address when we can't choose a reachable address
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.
Diffstat (limited to 'src/or/policies.c')
-rw-r--r-- | src/or/policies.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/policies.c b/src/or/policies.c index 50fec3a773..f09a708993 100644 --- a/src/or/policies.c +++ b/src/or/policies.c @@ -860,6 +860,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; } } |