[gPXE-devel] [PATCH 10/31] [ipv6] fix icmp6 neighbour solicit multicast address creation

matthew at theiselins.net matthew at theiselins.net
Fri Jul 8 10:28:19 EDT 2011


From: Matthew Iselin <matthew at theiselins.net>

Signed-off-by: Matthew Iselin <matthew at theiselins.net>
---
 src/net/icmpv6.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/net/icmpv6.c b/src/net/icmpv6.c
index 237fc4a..aee4ca0 100644
--- a/src/net/icmpv6.c
+++ b/src/net/icmpv6.c
@@ -48,16 +48,12 @@ int icmp6_send_solicit ( struct net_device *netdev, struct in6_addr *src __unuse
 	nsolicit->csum = 0;
 	nsolicit->csum = tcpip_chksum ( nsolicit, sizeof ( *nsolicit ) );
 
-	/* Solicited multicast address */
+	/* Solicited multicast address - FF02::1 (all stations on local network) */
+	memset(&st_dest.sin6, 0, sizeof(st_dest.sin6));
 	st_dest.sin6.sin_family = AF_INET6;
 	st_dest.sin6.sin6_addr.in6_u.u6_addr8[0] = 0xff;
-	st_dest.sin6.sin6_addr.in6_u.u6_addr8[2] = 0x02;
-	st_dest.sin6.sin6_addr.in6_u.u6_addr16[1] = 0x0000;
-	st_dest.sin6.sin6_addr.in6_u.u6_addr32[1] = 0x00000000;
-	st_dest.sin6.sin6_addr.in6_u.u6_addr16[4] = 0x0000;
-	st_dest.sin6.sin6_addr.in6_u.u6_addr16[5] = 0x0001;
-	st_dest.sin6.sin6_addr.in6_u.u6_addr32[3] = dest->in6_u.u6_addr32[3];
-	st_dest.sin6.sin6_addr.in6_u.u6_addr8[13] = 0xff;
+	st_dest.sin6.sin6_addr.in6_u.u6_addr8[1] = 0x2;
+	st_dest.sin6.sin6_addr.in6_u.u6_addr8[15] = 0x1;
 	
 	/* Send packet over IP6 */
 	return tcpip_tx ( iobuf, &icmp6_protocol, NULL, &st_dest.st,
-- 
1.7.2.5



More information about the gPXE-devel mailing list