From 81a346b34e841eccd2e7aabce66686262c7525dc Mon Sep 17 00:00:00 2001 From: Matthew Iselin Date: Mon, 30 May 2011 22:29:37 +1000 Subject: [PATCH] [ipv6] Fix icmp6 neighbour solicit multicast address creation Signed-off-by: Matthew Iselin Signed-off-by: Marty Connor --- src/net/icmpv6.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/net/icmpv6.c b/src/net/icmpv6.c index 237fc4a6..aee4ca06 100644 --- a/src/net/icmpv6.c +++ b/src/net/icmpv6.c @@ -48,17 +48,13 @@ 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, NULL, &nsolicit->csum ); -- 2.11.4.GIT