From bc566da957024a7663f3822d8ed82e25cd506e4f Mon Sep 17 00:00:00 2001 From: "Daniel P. Carvalho" Date: Sat, 19 Sep 2026 11:59:56 -0300 Subject: [PATCH] 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 Assisted-by: Claude:claude-sonnet-5 --- mm/iob/iob_alloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/iob/iob_alloc.c b/mm/iob/iob_alloc.c index 9eb822b9867..5674948e2c9 100644 --- a/mm/iob/iob_alloc.c +++ b/mm/iob/iob_alloc.c @@ -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;