1 From 98079ea89851da1df4966dfdfa1852a98da02912 Mon Sep 17 00:00:00 2001
2 From: Simon Kelley <simon@thekelleys.org.uk>
3 Date: Tue, 13 Oct 2015 20:30:32 +0100
4 Subject: [PATCH] Catch errors from sendmsg in DHCP code. Logs, eg, iptables
5 DROPS of dest 255.255.255.255
9 1 file changed, 6 insertions(+), 1 deletion(-)
11 diff --git a/src/dhcp.c b/src/dhcp.c
12 index e6fceb1..1c85e42 100644
15 @@ -452,8 +452,13 @@ void dhcp_packet(time_t now, int pxe_fd)
18 while(retry_send(sendmsg(fd, &msg, 0)));
20 + /* This can fail when, eg, iptables DROPS destination 255.255.255.255 */
22 + my_syslog(MS_DHCP | LOG_WARNING, _("Error sending DHCP packet to %s: %s"),
23 + inet_ntoa(dest.sin_addr), strerror(errno));
27 /* check against secondary interface addresses */
28 static int check_listen_addrs(struct in_addr local, int if_index, char *label,
29 struct in_addr netmask, struct in_addr broadcast, void *vparam)