mm/iob: fix CONFIG_NET_TIMESTAMPING typo in iob_alloc

net: add SO_TIMESTAMPING support for PKT sockets gated the io_conn
reset in iob_alloc_committed() and iob_tryalloc_internal() on
CONFIG_NET_TIMESTAMPING, then merged that symbol into
CONFIG_NET_TIMESTAMP without updating mm/iob/iob_alloc.c. Both
#ifdefs there test a symbol that no longer exists, so the reset is
never compiled in.

Recycled IOBs therefore kept the io_conn of their previous owner, and
pkt_input() treated ordinary received frames as TX timestamp loopback,
queueing them on conn->errahead instead of readahead.

Signed-off-by: Daniel P. Carvalho <danieloak@gmail.com>
Assisted-by: Claude:claude-sonnet-5
This commit is contained in:
Daniel P. Carvalho 2026-09-19 11:59:56 -03:00 • committed by Alan C. Assis
parent b180dc17ae
commit bc566da957

View file

@ -96,7 +96,7 @@ static FAR struct iob_s *iob_alloc_committed(void)
iob->io_len = 0; /* Length of the data in the entry */
iob->io_offset = 0; /* Offset to the beginning of data */
iob->io_pktlen = 0; /* Total length of the packet */
#ifdef CONFIG_NET_TIMESTAMPING
#ifdef CONFIG_NET_TIMESTAMP
iob->io_conn = NULL;
#endif
}
@ -138,7 +138,7 @@ static FAR struct iob_s *iob_tryalloc_internal(bool throttled)
iob->io_len = 0; /* Length of the data in the entry */
iob->io_offset = 0; /* Offset to the beginning of data */
iob->io_pktlen = 0; /* Total length of the packet */
#ifdef CONFIG_NET_TIMESTAMPING
#ifdef CONFIG_NET_TIMESTAMP
iob->io_conn = NULL;
#endif
return iob;