aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorrl1987 <rl1987@sdf.lonestar.org>2018-04-26 11:25:16 +0200
committerNick Mathewson <nickm@torproject.org>2018-09-12 09:06:14 -0400
commitd548453abdf6ed708b6cb7e0a58f11d40f0cf4d1 (patch)
tree8068a6c749ab00d5d7bd7f6ec00ebc465f3dbfc4 /src/core
parent9f7ed1d04e7afd261898236a70f3cd02697c4a01 (diff)
downloadtor-d548453abdf6ed708b6cb7e0a58f11d40f0cf4d1.tar.gz
tor-d548453abdf6ed708b6cb7e0a58f11d40f0cf4d1.zip
Log a notice when changing to/from wildcard IP address
Diffstat (limited to 'src/core')
-rw-r--r--src/core/mainloop/connection.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/mainloop/connection.c b/src/core/mainloop/connection.c
index 1cc83016fd..f435b29853 100644
--- a/src/core/mainloop/connection.c
+++ b/src/core/mainloop/connection.c
@@ -2843,12 +2843,11 @@ retry_all_listeners(smartlist_t *new_conns, int close_all_noncontrol)
connection_listener_new_for_port(r->new_port, &skip, &addr_in_use);
connection_t *old_conn = r->old_conn;
-
if (skip)
continue;
- connection_close_immediate(r->old_conn);
- connection_mark_for_close(r->old_conn);
+ connection_close_immediate(old_conn);
+ connection_mark_for_close(old_conn);
if (addr_in_use) {
new_conn = connection_listener_new_for_port(r->new_port,
@@ -2859,6 +2858,11 @@ retry_all_listeners(smartlist_t *new_conns, int close_all_noncontrol)
smartlist_add(new_conns, new_conn);
+ log_notice(LD_NET, "Closed no-longer-configured %s on %s:%d "
+ "(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);