diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-01-02 10:09:44 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-01-02 10:09:44 -0500 |
commit | 6e5e4f92ab8f63dfaed00a3dfeab7222c3e153a3 (patch) | |
tree | ff130240363dc1bbb69c1143c18f42e65dee681b | |
parent | 79a50afa0e3dd44fc5ef80806ccda501fab5a718 (diff) | |
parent | 09b9a35c07a35c0891f8cb10406c113155740d18 (diff) | |
download | tor-6e5e4f92ab8f63dfaed00a3dfeab7222c3e153a3.tar.gz tor-6e5e4f92ab8f63dfaed00a3dfeab7222c3e153a3.zip |
Merge remote-tracking branch 'teor/bug24736_028' into maint-0.2.9
-rw-r--r-- | changes/bug24736 | 6 | ||||
-rw-r--r-- | src/or/policies.c | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/changes/bug24736 b/changes/bug24736 new file mode 100644 index 0000000000..632560932a --- /dev/null +++ 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 index 28770bb38d..f58bf329ad 100644 --- a/src/or/policies.c +++ b/src/or/policies.c @@ -854,6 +854,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; } } |