|
|
d7059b |
From cae343c1f3bea9d1ca2e71d3709d3f02b799f94d Mon Sep 17 00:00:00 2001
|
|
|
d7059b |
From: Petr Mensik <pemensik@redhat.com>
|
|
|
d7059b |
Date: Thu, 4 Jul 2019 20:28:08 +0200
|
|
|
d7059b |
Subject: [PATCH 1/5] Log listening on new interfaces
|
|
|
d7059b |
|
|
|
d7059b |
Log in debug mode listening on interfaces. They can be dynamically
|
|
|
d7059b |
found, include interface number, since it is checked on TCP connections.
|
|
|
d7059b |
Print also addresses found on them.
|
|
|
d7059b |
---
|
|
|
d7059b |
src/network.c | 12 ++++++++++++
|
|
|
d7059b |
1 file changed, 12 insertions(+)
|
|
|
d7059b |
|
|
|
d7059b |
diff --git a/src/network.c b/src/network.c
|
|
|
d7059b |
index d75f560..fd90288 100644
|
|
|
d7059b |
--- a/src/network.c
|
|
|
d7059b |
+++ b/src/network.c
|
|
|
d7059b |
@@ -662,6 +662,13 @@ int enumerate_interfaces(int reset)
|
|
|
d7059b |
else
|
|
|
d7059b |
{
|
|
|
d7059b |
*up = l->next;
|
|
|
d7059b |
+ if (l->iface->done)
|
|
|
d7059b |
+ {
|
|
|
d7059b |
+ iface = l->iface;
|
|
|
d7059b |
+ (void)prettyprint_addr(&iface->addr, daemon->addrbuff);
|
|
|
d7059b |
+ my_syslog(LOG_DEBUG, _("stopped listening on %s(#%d): %s"),
|
|
|
d7059b |
+ iface->name, iface->index, daemon->addrbuff);
|
|
|
d7059b |
+ }
|
|
|
d7059b |
|
|
|
d7059b |
/* In case it ever returns */
|
|
|
d7059b |
l->iface->done = 0;
|
|
|
d7059b |
@@ -978,6 +985,9 @@ void create_bound_listeners(int dienow)
|
|
|
d7059b |
new->next = daemon->listeners;
|
|
|
d7059b |
daemon->listeners = new;
|
|
|
d7059b |
iface->done = 1;
|
|
|
d7059b |
+ (void)prettyprint_addr(&iface->addr, daemon->addrbuff);
|
|
|
d7059b |
+ my_syslog(LOG_DEBUG, _("listening on %s(#%d): %s"),
|
|
|
d7059b |
+ iface->name, iface->index, daemon->addrbuff);
|
|
|
d7059b |
}
|
|
|
d7059b |
|
|
|
d7059b |
/* Check for --listen-address options that haven't been used because there's
|
|
|
d7059b |
@@ -997,6 +1007,8 @@ void create_bound_listeners(int dienow)
|
|
|
d7059b |
{
|
|
|
d7059b |
new->next = daemon->listeners;
|
|
|
d7059b |
daemon->listeners = new;
|
|
|
d7059b |
+ (void)prettyprint_addr(&if_tmp->addr, daemon->addrbuff);
|
|
|
d7059b |
+ my_syslog(LOG_DEBUG, _("listening on %s"), daemon->addrbuff);
|
|
|
d7059b |
}
|
|
|
d7059b |
}
|
|
|
d7059b |
|
|
|
d7059b |
--
|
|
|
d7059b |
2.20.1
|
|
|
d7059b |
|