diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-10-23 15:55:48 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-10-23 15:55:48 -0400 |
commit | b1d6cf2508e57c98017412446024c9dd6587fe63 (patch) | |
tree | e2eaf121f9a87a4a957a528f15ab57b01adeb984 /src/or/nodelist.c | |
parent | 8b8d501040946bb2280a9640f91a55b7f17b03e3 (diff) | |
parent | f0a6ea0bfd6afaa718c6b3d521a5d195d47ba56d (diff) | |
download | tor-b1d6cf2508e57c98017412446024c9dd6587fe63.tar.gz tor-b1d6cf2508e57c98017412446024c9dd6587fe63.zip |
Merge branch 'maint-0.3.1' into maint-0.3.2
Diffstat (limited to 'src/or/nodelist.c')
-rw-r--r-- | src/or/nodelist.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/nodelist.c b/src/or/nodelist.c index eae74e18b5..0743be1802 100644 --- a/src/or/nodelist.c +++ b/src/or/nodelist.c @@ -1435,6 +1435,11 @@ node_get_prim_orport(const node_t *node, tor_addr_port_t *ap_out) node_assert_ok(node); tor_assert(ap_out); + /* Clear the address, as a safety precaution if calling functions ignore the + * return value */ + tor_addr_make_null(&ap_out->addr, AF_INET); + ap_out->port = 0; + /* Check ri first, because rewrite_node_address_for_bridge() updates * node->ri with the configured bridge address. */ |