Files
bpfire/src/patches/dnsmasq/0052-Fix-uninitialized-value-used-in-get_client_mac.patch
2015-05-20 23:35:38 +02:00

28 lines
806 B
Diff

From 0705a7e2d57654b27c7e14f35ca77241c1821f4d Mon Sep 17 00:00:00 2001
From: Tomas Hozza <thozza@redhat.com>
Date: Mon, 23 Feb 2015 21:26:26 +0000
Subject: [PATCH 52/98] Fix uninitialized value used in get_client_mac()
---
src/dhcp6.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/dhcp6.c b/src/dhcp6.c
index 3c56e77c6085..c7144f5fee7c 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);
--
2.1.0