nuttx/net
zhekunren f80016f4c7 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 19:39:26 +08:00
..
arp include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
bluetooth net/bluetooth: fix BTPROTO_HCI socket device lookup 2026-05-06 14:45:46 +08:00
can include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
devif net/ipfilter: Reassemble IPv6 fragments before filtering 2026-08-04 09:35:06 +08:00
icmp !sys/types.h: change time_t and clock_t to int64_t to align with other OSes 2026-05-19 16:21:28 +08:00
icmpv6 !sys/types.h: change time_t and clock_t to int64_t to align with other OSes 2026-05-19 16:21:28 +08:00
ieee802154 include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
igmp net/igmp: fix length check that always dropped valid IGMP packets 2026-08-06 19:39:26 +08:00
inet include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
ipfilter include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
ipforward net/ipv4: Forward fragments before local reassembly 2026-08-04 09:35:06 +08:00
ipfrag net/ipv4: Forward fragments before local reassembly 2026-08-04 09:35:06 +08:00
local include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
mld !sys/types.h: change time_t and clock_t to int64_t to align with other OSes 2026-05-19 16:21:28 +08:00
nat net/nat: Reassemble IPv6 fragments before NAT66 2026-08-04 09:35:06 +08:00
neighbor include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
netdev net/netdev/netdev_txnotify.c: add debug log with interface name 2026-05-06 01:16:40 +08:00
netfilter net/netfilter: fix match name for UDP in ipt_filter 2026-04-13 08:46:57 -03:00
netlink net/netlink: fix memory leak in netlink_get_neighbor 2026-04-13 08:46:57 -03:00
pkt include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
procfs !include/fcntl.h: align open flags with Linux values 2026-07-03 10:33:47 +08:00
route net/route: fix return value of net_writeroute_ipv6 2026-04-13 08:46:57 -03:00
rpmsg include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
sixlowpan net/sixlowpan: Fix protosize to 16-bit 2026-08-03 17:15:39 +08:00
socket include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
tcp net/tcp/tcp_send: Remove work_available check when updating retransmit timer 2026-08-05 20:46:17 +08:00
udp net/udp: fix conn_unlock not called outside conditional block 2026-04-09 03:04:15 +08:00
usrsock include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
utils !sys/types.h: change time_t and clock_t to int64_t to align with other OSes 2026-05-19 16:21:28 +08:00
CMakeLists.txt net: Support no-lto option for the network build. 2026-01-20 10:12:45 +08:00
Kconfig net: Support no-lto option for the network build. 2026-01-20 10:12:45 +08:00
Makefile tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-08-04 00:36:32 +08:00
net_initialize.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00