summaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorQingfang Deng <qingfang.deng@linux.dev>2026-11-02 11:59:43 +0800
committerPaolo Abeni <pabeni@redhat.com>2026-11-05 12:36:46 +0100
commit57889a8f6d49fc153aa0017d13086ab736567f8a (patch)
tree7100680ab8abb88ad7004414a283379c300cdefb /include/uapi/linux
parent37dfd0efbfffc20a57e41c2eb349ac49b1ca1ff8 (diff)
tcp: initialize send sequence numbers before deferring TFO
TCP_FASTOPEN_CONNECT can return from connect() before tcp_connect_init() when a cached cookie or cookieless Fast Open allows deferring the SYN. At this point write_seq contains the initial sequence number, while snd_una and snd_nxt have not been initialized to that sequence number. Consequently, inet_diag and /proc/net/tcp{,6} report the initial sequence number as the send queue length despite no SYN or payload being queued. Initialize snd_una and snd_nxt to write_seq before marking the connection as deferred. Both sequence-based queue lengths then remain zero until the first write starts the connection and runs tcp_connect_init(). Fixes: 19f6d3f3c842 ("net/tcp-fastopen: Add new API support") Signed-off-by: Qingfang Deng <qingfang.deng@linux.dev> Reviewed-by: Eric Dumazet <edumazet@kernel.org> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Reviewed-by: Neal Cardwell <ncardwell@google.com> Link: https://patch.msgid.link/20261102035943.9700-1-qingfang.deng@linux.dev Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/uapi/linux')
0 files changed, 0 insertions, 0 deletions