nuttx/net
Daniel P. Carvalho 432717c34c net/pkt: clear pending TX IOB reference when poll callback finishes
pkt_poll() records the outgoing IOB in pkt_conn->pendiob so that any
synchronous TX tap or loopback executed during the driver callback can
skip delivering the packet back to the sending socket.

Previously, pendiob was never cleared upon TX completion and would
linger across transmissions as a dangling pointer. Because the IOB
pool is small and recycled quickly (LIFO), a subsequent incoming
packet from the network frequently reused the same IOB buffer address,
causing pkt_in() to drop legitimate RX packets as false self-echoes.

Drop the pendiob reference immediately after callback(dev) returns in
devif_poll_pkt_connections(), ensuring the pointer never outlives the
transmission cycle.

Also fixes a pre-existing nxstyle alignment issue in devif_poll.c
IPv6 version-check block (unrelated nerr() call), since this file is
now touched and CI enforces style on the whole file.

Suggested-by: zhhyu7
Assisted-by: Gemini:gemini-3.8-flash-medium
Signed-off-by: Daniel P. Carvalho <danieloak@gmail.com>
2026-09-17 09:44:19 -03:00
..
arp net/arp: do not resolve an address to another interface's MAC 2026-08-17 11:28:45 +08:00
bluetooth net/bluetooth: fix BTPROTO_HCI socket device lookup 2026-05-06 14:45:46 +08:00
can net, arch: Fix nxstyle errors in files the CAN ioctl merge touches. 2026-09-01 17:40:47 +08:00
devif net/pkt: clear pending TX IOB reference when poll callback finishes 2026-09-17 09:44:19 -03: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 checksum validation that always dropped valid IGMP packets 2026-08-07 16:36:42 +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-01 17:40:07 -03:00
ipfrag net/ipv4: Forward fragments before local reassembly 2026-08-01 17:40:07 -03:00
local net/local: fix SCM_RIGHTS pointer and memory corruption 2026-08-21 02:19:10 +08: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-01 17:40:07 -03:00
neighbor include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
netdev net, arch: Fix nxstyle errors in files the CAN ioctl merge touches. 2026-09-01 17:40:47 +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 net/pkt: clear pending TX IOB reference when poll callback finishes 2026-09-17 09:44:19 -03:00
procfs !include/fcntl.h: align open flags with Linux values 2026-06-30 13:43:44 +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-07-28 10:19:05 +08:00
socket include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
tcp net/tcp: add configurable delayed ACK threshold 2026-09-08 09:00:19 +08:00
udp net/udp: fix d_len corruption for 2nd+ SO_REUSEADDR listener 2026-08-12 09:41:52 -03:00
usrsock arch/sim: Add AF_LOCAL support to host usrsock 2026-07-23 15:34:02 +08:00
utils net: preserve checksum state for empty fragments 2026-09-05 10:36:43 +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-07-28 21:26:03 -03:00
net_initialize.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00