nuttx/net
zhekunren f11df565ea net/igmp: fix length check that always dropped valid IGMP packets
igmp_input() verified the packet length with:

  if (dev->d_len < NET_LL_HDRLEN(dev) + (iphdrlen + IGMP_HDRLEN))

but dev->d_len at this point holds the IPv4 total length (IP header plus
payload) without the link-layer header, consistent with the convention
established in ipv4_in()/ipv6_in() (which do `dev->d_len -=
NET_LL_HDRLEN(dev)`) and used by all other transport input handlers
(icmp, tcp, udp), none of which reference NET_LL_HDRLEN.

Adding NET_LL_HDRLEN(dev) to the right-hand side made the check always
true for valid IGMP packets:

  iphdrlen + IGMP_HDRLEN < NET_LL_HDRLEN + iphdrlen + IGMP_HDRLEN
                         (= 0 < NET_LL_HDRLEN)

so every well-formed IGMP message hit the "Length error" path and was
silently dropped, breaking IGMP membership query/report processing.

Drop the extra NET_LL_HDRLEN(dev) so the check matches the other
protocol handlers.

Signed-off-by: zhekunren <zhekunren@qq.com>
2026-08-06 12:49:31 +02:00
..
arp
bluetooth
can
devif net/ipfilter: Reassemble IPv6 fragments before filtering 2026-08-01 17:40:07 -03:00
icmp
icmpv6
ieee802154
igmp net/igmp: fix length check that always dropped valid IGMP packets 2026-08-06 12:49:31 +02:00
inet
ipfilter
ipforward net/ipv4: Forward fragments before local reassembly 2026-08-01 17:40:07 -03:00
ipfrag net/ipv4: Forward fragments before local reassembly 2026-08-01 17:40:07 -03:00
local
mld
nat net/nat: Reassemble IPv6 fragments before NAT66 2026-08-01 17:40:07 -03:00
neighbor
netdev
netfilter
netlink
pkt
procfs !include/fcntl.h: align open flags with Linux values 2026-06-30 13:43:44 +08:00
route
rpmsg
sixlowpan net/sixlowpan: Fix protosize to 16-bit 2026-07-28 10:19:05 +08:00
socket
tcp net/tcp/tcp_send: Remove work_available check when updating retransmit timer 2026-08-05 10:56:59 +02:00
udp
usrsock arch/sim: Add AF_LOCAL support to host usrsock 2026-07-23 15:34:02 +08:00
utils
CMakeLists.txt
Kconfig
Makefile tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-07-28 21:26:03 -03:00
net_initialize.c