This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new bc566da9570 mm/iob: fix CONFIG_NET_TIMESTAMPING typo in iob_alloc
bc566da9570 is described below
commit bc566da957024a7663f3822d8ed82e25cd506e4f
Author: Daniel P. Carvalho <[email protected]>
AuthorDate: Sat Sep 19 11:59:56 2026 -0300
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 <[email protected]>
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;