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 da35465d439 tcp_input.c: standardize the processing of urgent data
da35465d439 is described below
commit da35465d43971473f524a4e0a45baa05dee3d501
Author: zhanghongyu <[email protected]>
AuthorDate: Fri Aug 22 19:06:39 2025 +0800
tcp_input.c: standardize the processing of urgent data
urgent data needs to be treated as normal data when
CONFIG_NET_TCPURGDATA disable. some test sets will verify this
behavior, correct the processing logic.
Signed-off-by: zhanghongyu <[email protected]>
---
net/tcp/tcp_input.c | 28 +---------------------------
1 file changed, 1 insertion(+), 27 deletions(-)
diff --git a/net/tcp/tcp_input.c b/net/tcp/tcp_input.c
index 74c8d53651d..54cbd2e73d8 100644
--- a/net/tcp/tcp_input.c
+++ b/net/tcp/tcp_input.c
@@ -1600,33 +1600,7 @@ skip_rtt:
}
#else /* CONFIG_NET_TCPURGDATA */
- /* Check the URG flag. If this is set, We must gracefully ignore
- * and discard the urgent data.
- */
-
- if ((tcp->flags & TCP_URG) != 0)
- {
- uint16_t urglen = (tcp->urgp[0] << 8) | tcp->urgp[1];
- if (urglen > dev->d_len)
- {
- /* There is more urgent data in the next segment to come. */
-
- urglen = dev->d_len;
- }
-
- /* The d_len field contains the length of the incoming data;
- * The d_appdata field points to the any "normal" data that
- * may follow the urgent data.
- *
- * NOTE: If the urgent data continues in the next packet, then
- * d_len will be zero and d_appdata will point past the end of
- * the payload (which is OK).
- */
-
- net_incr32(conn->rcvseq, urglen);
- dev->d_len -= urglen;
- dev->d_appdata += urglen;
- }
+ /* Urgent data needs to be treated as normal data */
#endif /* CONFIG_NET_TCPURGDATA */
#ifdef CONFIG_NET_TCP_KEEPALIVE