]> git.ipfire.org Git - people/ms/dnsmasq.git/commitdiff
Fix sporadic crash in find_mac() - hwlen must be zero for empty entries.
authorSimon Kelley <simon@thekelleys.org.uk>
Mon, 18 Jan 2016 12:51:08 +0000 (12:51 +0000)
committerSimon Kelley <simon@thekelleys.org.uk>
Mon, 18 Jan 2016 12:51:08 +0000 (12:51 +0000)
src/arp.c

index 968455cd5a1fa43005cd47a3aa9e28641ace319b..d70d2afa745e2a733fdda414a1113b42b22c005e 100644 (file)
--- a/src/arp.c
+++ b/src/arp.c
@@ -188,7 +188,8 @@ int find_mac(union mysockaddr *addr, unsigned char *mac, int lazy, time_t now)
       arps = arp;
       arp->status = ARP_EMPTY;
       arp->family = addr->sa.sa_family;
-      
+      arp->hwlen = 0;
+
       if (addr->sa.sa_family == AF_INET)
        arp->addr.addr.addr4.s_addr = addr->in.sin_addr.s_addr;
 #ifdef HAVE_IPV6