]> git.ipfire.org Git - people/ms/dnsmasq.git/commitdiff
LOG error of ARP-injection fails.
authorSimon Kelley <simon@thekelleys.org.uk>
Fri, 23 May 2014 19:44:59 +0000 (20:44 +0100)
committerSimon Kelley <simon@thekelleys.org.uk>
Fri, 23 May 2014 19:44:59 +0000 (20:44 +0100)
src/dhcp.c

index 92ea92b0bc9a389b28bc8dcb936b8c07a44d0e59..9463e2328311fa6f71c4ed36e8b578bc7c0e8f1a 100644 (file)
@@ -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)