lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] ip6_addr_ismulticast_ doesn't allow for transient multicast


From: Ian
Subject: [lwip-users] ip6_addr_ismulticast_ doesn't allow for transient multicast address
Date: Sat, 13 Dec 2014 18:52:11 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.2.0

If I read RFC1884 (section 2.6) correctly the ip6_addr_ismulticast_*
macros need to allow for the T-bit=1 indicating that a transient
multicast address is being used. The following diff shows the changes
I've made locally.

Regards,

Ian

diff --git a/ethernet/lwip-git/src/include/ipv6/lwip/ip6_addr.h
b/ethernet/lwip-git/src/include/ipv6/lwip/ip6_addr.h
index 4e5f4a2..7046b57 100644
--- a/ethernet/lwip-git/src/include/ipv6/lwip/ip6_addr.h
+++ b/ethernet/lwip-git/src/include/ipv6/lwip/ip6_addr.h
@@ -195,12 +195,12 @@ Little-endian version, stored in network order (no
htonl). */
 #define IP6_MULTICAST_SCOPE_ORGANIZATION_LOCAL  0x8
 #define IP6_MULTICAST_SCOPE_GLOBAL              0xe
 #define IP6_MULTICAST_SCOPE_RESERVEDF           0xf
-#define ip6_addr_ismulticast_iflocal(ip6addr) (((ip6addr)->addr[0] &
PP_HTONL(0xffff0000UL)) == PP_HTONL(0xff010000UL))
-#define ip6_addr_ismulticast_linklocal(ip6addr) (((ip6addr)->addr[0] &
PP_HTONL(0xffff0000UL)) == PP_HTONL(0xff020000UL))
-#define ip6_addr_ismulticast_adminlocal(ip6addr) (((ip6addr)->addr[0] &
PP_HTONL(0xffff0000UL)) == PP_HTONL(0xff040000UL))
-#define ip6_addr_ismulticast_sitelocal(ip6addr) (((ip6addr)->addr[0] &
PP_HTONL(0xffff0000UL)) == PP_HTONL(0xff050000UL))
-#define ip6_addr_ismulticast_orglocal(ip6addr) (((ip6addr)->addr[0] &
PP_HTONL(0xffff0000UL)) == PP_HTONL(0xff080000UL))
-#define ip6_addr_ismulticast_global(ip6addr) (((ip6addr)->addr[0] &
PP_HTONL(0xffff0000UL)) == PP_HTONL(0xff0e0000UL))
+#define ip6_addr_ismulticast_iflocal(ip6addr) (((ip6addr)->addr[0] &
PP_HTONL(0xffef0000UL)) == PP_HTONL(0xff010000UL))
+#define ip6_addr_ismulticast_linklocal(ip6addr) (((ip6addr)->addr[0] &
PP_HTONL(0xffef0000UL)) == PP_HTONL(0xff020000UL))
+#define ip6_addr_ismulticast_adminlocal(ip6addr) (((ip6addr)->addr[0] &
PP_HTONL(0xffef0000UL)) == PP_HTONL(0xff040000UL))
+#define ip6_addr_ismulticast_sitelocal(ip6addr) (((ip6addr)->addr[0] &
PP_HTONL(0xffef0000UL)) == PP_HTONL(0xff050000UL))
+#define ip6_addr_ismulticast_orglocal(ip6addr) (((ip6addr)->addr[0] &
PP_HTONL(0xffef0000UL)) == PP_HTONL(0xff080000UL))
+#define ip6_addr_ismulticast_global(ip6addr) (((ip6addr)->addr[0] &
PP_HTONL(0xffef0000UL)) == PP_HTONL(0xff0e0000UL))
 
 /* TODO define get/set for well-know multicast addresses, e.g. ff02::1 */
 #define ip6_addr_isallnodes_iflocal(ip6addr) (((ip6addr)->addr[0] ==
PP_HTONL(0xff010000UL)) && \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]