Suppress useless warning about DHCP packets of interfaces without addresses.

This only makes sense for interfaces which we're configured to listen on.
Thanks to Andrew Shadura for bug report.
This commit is contained in:
Simon Kelley committed 2016-08-28 18:09:17 +01:00
1 parent 396750cef5
commit e94ad0fa01
1 file changed
+2 -1
+2 -1
View File
@@ -280,7 +280,8 @@ void dhcp_packet(time_t now, int pxe_fd)
iface_addr = ((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr;
else
{
my_syslog(MS_DHCP | LOG_WARNING, _("DHCP packet received on %s which has no address"), ifr.ifr_name);
if (iface_check(AF_INET, NULL, ifr.ifr_name, NULL))
my_syslog(MS_DHCP | LOG_WARNING, _("DHCP packet received on %s which has no address"), ifr.ifr_name);
return;
}