[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <93b4b95893b9cdd1afc06f22db7f9389a9c906e5.1741877016.git.jgh@exim.org>
Date: Thu, 13 Mar 2025 14:45:50 +0000
From: Jeremy Harris <jgh@...m.org>
To: netdev@...r.kernel.org
Cc: Jeremy Harris <jgh@...m.org>
Subject: [RFC PATCH net-next 1/2] TCP: note received valid-cookie Fast Open option
Signed-off-by: Jeremy Harris <jgh@...m.org>
---
include/linux/tcp.h | 3 ++-
net/ipv4/tcp_fastopen.c | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
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),
--
2.48.1
Powered by blists - more mailing lists