summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Kelley <simon@thekelleys.org.uk>2014-05-23 20:44:59 +0100
committerSimon Kelley <simon@thekelleys.org.uk>2014-05-23 20:44:59 +0100
commit2f4c4b6076885536839fb16942b10f2c4efa8f44 (patch)
treec1354cd23b8377be92d4a9160a7823bf8bee28bd
parenta008a843cf1d36c680bee9ffc16137228c62162b (diff)
downloaddnsmasq-2f4c4b6076885536839fb16942b10f2c4efa8f44.tar.gz
LOG error of ARP-injection fails.
-rw-r--r--src/dhcp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dhcp.c b/src/dhcp.c
index 92ea92b..9463e23 100644
--- a/src/dhcp.c
+++ b/src/dhcp.c
@@ -404,7 +404,8 @@ void dhcp_packet(time_t now, int pxe_fd)
memcpy(arp_req.arp_ha.sa_data, mess->chaddr, mess->hlen);
/* interface name already copied in */
arp_req.arp_flags = ATF_COM;
- ioctl(daemon->dhcpfd, SIOCSARP, &arp_req);
+ if (ioctl(daemon->dhcpfd, SIOCSARP, &arp_req) == -1)
+ my_syslog(MS_DHCP | LOG_ERR, _("ARP-cache injection failed: %s"), strerror(errno));
}
#elif defined(HAVE_SOLARIS_NETWORK)
else if ((ntohs(mess->flags) & 0x8000) || mess->hlen != ETHER_ADDR_LEN || mess->htype != ARPHRD_ETHER)