diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-10-10 09:24:48 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-10-10 09:24:48 -0400 |
commit | da86a70bd8ea6c468ac7e27a53245bbeb9d28b58 (patch) | |
tree | 25fae2abf6c1ddd83afaeb04c2621effc2a0f8f3 /src | |
parent | 7409aa58d18f23d17b03898a4e2b06fba7c2e102 (diff) | |
parent | fb1d37f34f0f3fcd6c5124834e0f3abb8159311e (diff) | |
download | tor-da86a70bd8ea6c468ac7e27a53245bbeb9d28b58.tar.gz tor-da86a70bd8ea6c468ac7e27a53245bbeb9d28b58.zip |
Merge remote-tracking branch 'tor-github/pr/384'
Diffstat (limited to 'src')
-rw-r--r-- | src/core/mainloop/connection.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/core/mainloop/connection.c b/src/core/mainloop/connection.c index d8326a5be8..ef8c60a3da 100644 --- a/src/core/mainloop/connection.c +++ b/src/core/mainloop/connection.c @@ -2762,6 +2762,11 @@ retry_listener_ports(smartlist_t *old_conns, const port_cfg_t *found_port = NULL; /* Okay, so this is a listener. Is it configured? */ + /* That is, is it either: 1) exact match - address and port + * pair match exactly between old listener and new port; or 2) + * wildcard match - port matches exactly, but *one* of the + * addresses is wildcard (0.0.0.0 or ::)? + */ SMARTLIST_FOREACH_BEGIN(launch, const port_cfg_t *, wanted) { if (conn->type != wanted->type) continue; @@ -2805,6 +2810,7 @@ retry_listener_ports(smartlist_t *old_conns, SMARTLIST_DEL_CURRENT(launch, wanted); SMARTLIST_DEL_CURRENT(old_conns, conn); + break; } #endif } @@ -2900,9 +2906,6 @@ retry_all_listeners(smartlist_t *new_conns, int close_all_noncontrol) "(replaced by %s:%d)", conn_type_to_string(old_conn->type), old_conn->address, old_conn->port, new_conn->address, new_conn->port); - - tor_free(r); - SMARTLIST_DEL_CURRENT(replacements, r); } SMARTLIST_FOREACH_END(r); #endif |