diff mbox series

[RFC,net-next,1/2] TCP: note received valid-cookie Fast Open option

Message ID 93b4b95893b9cdd1afc06f22db7f9389a9c906e5.1741877016.git.jgh@exim.org (mailing list archive)
State RFC
Delegated to: Netdev Maintainers
Headers show
Series TCP: Fast-Open observability | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next, async
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 12 this patch: 12
netdev/build_tools success Errors and warnings before: 26 (+0) this patch: 26 (+0)
netdev/cc_maintainers fail 7 maintainers not CCed: edumazet@google.com kuniyu@amazon.com pabeni@redhat.com dsahern@kernel.org ncardwell@google.com horms@kernel.org kuba@kernel.org
netdev/build_clang success Errors and warnings before: 24 this patch: 24
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 2052 this patch: 2052
netdev/checkpatch warning WARNING: Missing commit description - Add an appropriate one
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 2 this patch: 2
netdev/source_inline success Was 0 now: 0

Commit Message

Jeremy Harris March 13, 2025, 2:45 p.m. UTC
Signed-off-by: Jeremy Harris <jgh@exim.org>
---
 include/linux/tcp.h     | 3 ++-
 net/ipv4/tcp_fastopen.c | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 159b2c59e..c32c8ba59 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -382,7 +382,8 @@  struct tcp_sock {
 		syn_fastopen:1,	/* SYN includes Fast Open option */
 		syn_fastopen_exp:1,/* SYN includes Fast Open exp. option */
 		syn_fastopen_ch:1, /* Active TFO re-enabling probe */
-		syn_data_acked:1;/* data in SYN is acked by SYN-ACK */
+		syn_data_acked:1,/* data in SYN is acked by SYN-ACK */
+		syn_fastopen_in:1; /* Received SYN includes Fast Open option */
 
 	u8	keepalive_probes; /* num of allowed keep alive probes	*/
 	u32	tcp_tx_delay;	/* delay (in usec) added to TX packets */
diff --git a/net/ipv4/tcp_fastopen.c b/net/ipv4/tcp_fastopen.c
index 1a6b1bc54..004d0024c 100644
--- a/net/ipv4/tcp_fastopen.c
+++ b/net/ipv4/tcp_fastopen.c
@@ -401,6 +401,7 @@  struct sock *tcp_try_fastopen(struct sock *sk, struct sk_buff *skb,
 				}
 				NET_INC_STATS(sock_net(sk),
 					      LINUX_MIB_TCPFASTOPENPASSIVE);
+				tcp_sk(child)->syn_fastopen_in = 1;
 				return child;
 			}
 			NET_INC_STATS(sock_net(sk),