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