Blame SOURCES/dnsmasq-2.76-rh1721668-1.patch

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