net/: There are many different checks for IPv6 multicast addresses. Most of the checks are different. RFC 3513 clearly specifies how to detect an IPv6 multilcast address: they should begin with 0xffxx. I did not change some of the checks in ipv6_input.c, however. In that file, the comments indicate that the code should only pick of certain mulicast address that begin withi 0xff02.

This commit is contained in:
Gregory Nutt
2018-06-23 10:13:38 -06:00
parent 5db2f993f9
commit 5bb216fb90
5 changed files with 23 additions and 18 deletions
+2 -6
View File
@@ -300,13 +300,9 @@ FAR struct net_driver_s *netdev_findby_ipv6addr(const net_ipv6addr_t lipaddr,
int ret;
#endif
/* First, check if this is the multicast IP address We should actually
* pick off certain multicast address (all hosts multicast address, and
* the solicited-node multicast address). We will cheat here and accept
* all multicast packets that are destined for the ff02::/16 addresses.
*/
/* First, check if this is the multicast IP address */
if (ripaddr[0] == HTONS(0xff02))
if (net_is_addr_mcast(ripaddr))
{
/* Yes.. Check the local, bound address. Is it INADDR_ANY? */