From e94ad0fa01ccc8d0c39e069ab29b008f9c811600 Mon Sep 17 00:00:00 2001 From: Simon Kelley Date: Sun, 28 Aug 2016 18:09:17 +0100 Subject: [PATCH] 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. --- src/dhcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dhcp.c b/src/dhcp.c index 10f1fb9..fb2f650 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -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; }