mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Suppress logging of listen addresses during startup.
The initial call to enumerate_interfaces() happens before the logging subsystem in initialised and the startup banner logged. It's not intended that syslog be written at this point.
This commit is contained in:
@@ -1034,17 +1034,22 @@ void create_bound_listeners(int dienow)
|
||||
}
|
||||
else if ((new = create_listeners(&iface->addr, iface->tftp_ok, dienow)))
|
||||
{
|
||||
int port;
|
||||
|
||||
new->iface = iface;
|
||||
new->next = daemon->listeners;
|
||||
daemon->listeners = new;
|
||||
iface->done = 1;
|
||||
port = prettyprint_addr(&iface->addr, daemon->addrbuff);
|
||||
|
||||
/* Don't log the initial set of listen addresses created
|
||||
at startup, since this is happening before the logging
|
||||
system is initialised and the sign-on printed. */
|
||||
if (!dienow)
|
||||
{
|
||||
int port = prettyprint_addr(&iface->addr, daemon->addrbuff);
|
||||
my_syslog(LOG_DEBUG, _("listening on %s(#%d): %s port %d"),
|
||||
iface->name, iface->index, daemon->addrbuff, port);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Check for --listen-address options that haven't been used because there's
|
||||
no interface with a matching address. These may be valid: eg it's possible
|
||||
@@ -1061,14 +1066,16 @@ void create_bound_listeners(int dienow)
|
||||
if (!if_tmp->used &&
|
||||
(new = create_listeners(&if_tmp->addr, !!option_bool(OPT_TFTP), dienow)))
|
||||
{
|
||||
int port;
|
||||
|
||||
new->next = daemon->listeners;
|
||||
daemon->listeners = new;
|
||||
port = prettyprint_addr(&if_tmp->addr, daemon->addrbuff);
|
||||
|
||||
if (!dienow)
|
||||
{
|
||||
int port = prettyprint_addr(&if_tmp->addr, daemon->addrbuff);
|
||||
my_syslog(LOG_DEBUG, _("listening on %s port %d"), daemon->addrbuff, port);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* In --bind-interfaces, the only access control is the addresses we're listening on.
|
||||
There's nothing to avoid a query to the address of an internal interface arriving via
|
||||
|
||||
Reference in New Issue
Block a user