summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Hozza <thozza@redhat.com>2015-02-23 21:26:26 +0000
committerSimon Kelley <simon@thekelleys.org.uk>2015-02-23 21:26:26 +0000
commit0705a7e2d57654b27c7e14f35ca77241c1821f4d (patch)
treeed06fbb78bf194ce075d8a1bf5545f338eb6fdfa
parent28b879ac47b872af6e8c5e86d76806c69338434d (diff)
downloaddnsmasq-0705a7e2d57654b27c7e14f35ca77241c1821f4d.tar.gz
Fix uninitialized value used in get_client_mac()
-rw-r--r--src/dhcp6.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dhcp6.c b/src/dhcp6.c
index 3c56e77..c7144f5 100644
--- a/src/dhcp6.c
+++ b/src/dhcp6.c
@@ -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);