]> git.ipfire.org Git - people/ms/dnsmasq.git/commitdiff
Fix uninitialized value used in get_client_mac()
authorTomas Hozza <thozza@redhat.com>
Mon, 23 Feb 2015 21:26:26 +0000 (21:26 +0000)
committerSimon Kelley <simon@thekelleys.org.uk>
Mon, 23 Feb 2015 21:26:26 +0000 (21:26 +0000)
src/dhcp6.c

index 3c56e77c60855cc13c8d0cd2a3768399021f8728..c7144f5fee7ce545766b4e7126f1138327274e1b 100644 (file)
@@ -246,7 +246,9 @@ void get_client_mac(struct in6_addr *client, int iface, unsigned char *mac, unsi
   neigh.code = 0;
   neigh.reserved = 0;
   neigh.target = *client;
-  
+  /* RFC4443 section-2.3: checksum has to be zero to be calculated */
+  neigh.checksum = 0;
+   
   memset(&addr, 0, sizeof(addr));
 #ifdef HAVE_SOCKADDR_SA_LEN
   addr.sin6_len = sizeof(struct sockaddr_in6);