igmp: call IFF_SET_IPv4 when igmp_send

If the flag is not set, The flag is affected by the previously sent and
received packets, L2 header may be filled with ipv6

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
zhanghongyu 2023-11-15 17:45:26 +08:00 committed by Xiang Xiao
parent 479dda98ed
commit 8a479cc2ca

View File

@ -116,6 +116,10 @@ void igmp_send(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group,
return;
}
/* Select IPv4 */
IFF_SET_IPv4(dev->d_flags);
/* The IGMP header immediately follows the IP header */
iphdrlen = IPv4_HDRLEN + RASIZE;