mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 23:40:19 +08:00
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:
@@ -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? */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user