mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Log which interface is actually used when a different was configured
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -632,7 +632,7 @@ struct irec {
|
|||||||
union mysockaddr addr;
|
union mysockaddr addr;
|
||||||
struct in_addr netmask; /* only valid for IPv4 */
|
struct in_addr netmask; /* only valid for IPv4 */
|
||||||
int tftp_ok, dhcp_ok, mtu, done, warned, dad, dns_auth, index, multicast_done, found, label;
|
int tftp_ok, dhcp_ok, mtu, done, warned, dad, dns_auth, index, multicast_done, found, label;
|
||||||
char *name;
|
char *name, *slabel;
|
||||||
struct irec *next;
|
struct irec *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -544,9 +544,11 @@ static int iface_allowed(struct iface_param *param, int if_index, char *label,
|
|||||||
iface->done = iface->multicast_done = iface->warned = 0;
|
iface->done = iface->multicast_done = iface->warned = 0;
|
||||||
iface->index = if_index;
|
iface->index = if_index;
|
||||||
iface->label = is_label;
|
iface->label = is_label;
|
||||||
if ((iface->name = whine_malloc(strlen(ifr.ifr_name)+1)))
|
if ((iface->slabel = whine_malloc(strlen(label)+1)) &&
|
||||||
|
(iface->name = whine_malloc(strlen(ifr.ifr_name)+1)))
|
||||||
{
|
{
|
||||||
strcpy(iface->name, ifr.ifr_name);
|
strcpy(iface->name, ifr.ifr_name);
|
||||||
|
strcpy(iface->slabel, label);
|
||||||
iface->next = daemon->interfaces;
|
iface->next = daemon->interfaces;
|
||||||
daemon->interfaces = iface;
|
daemon->interfaces = iface;
|
||||||
return 1;
|
return 1;
|
||||||
@@ -1221,7 +1223,7 @@ void warn_wild_labels(void)
|
|||||||
|
|
||||||
for (iface = daemon->interfaces; iface; iface = iface->next)
|
for (iface = daemon->interfaces; iface; iface = iface->next)
|
||||||
if (iface->found && iface->name && iface->label)
|
if (iface->found && iface->name && iface->label)
|
||||||
my_syslog(LOG_WARNING, _("warning: using interface %s instead"), iface->name);
|
my_syslog(LOG_WARNING, _("warning: using interface %s instead of %s"), iface->name, iface->slabel);
|
||||||
}
|
}
|
||||||
|
|
||||||
void warn_int_names(void)
|
void warn_int_names(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user