Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F159388080
D8219.id21252.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D8219.id21252.diff
View Options
Index: sys/netinet/tcp_input.c
===================================================================
--- sys/netinet/tcp_input.c
+++ sys/netinet/tcp_input.c
@@ -1024,7 +1024,7 @@
#endif
if (!((tp->t_state == TCPS_ESTABLISHED && (thflags & TH_SYN) == 0) ||
(tp->t_state == TCPS_LISTEN && (thflags & TH_SYN) &&
- !(tp->t_flags & TF_FASTOPEN)))) {
+ !IS_FASTOPEN(tp->t_flags)))) {
if (ti_locked == TI_UNLOCKED) {
if (INP_INFO_TRY_RLOCK(&V_tcbinfo) == 0) {
in_pcbref(inp);
@@ -1502,7 +1502,9 @@
struct in_conninfo *inc;
struct mbuf *mfree;
struct tcpopt to;
+#ifdef TCP_RFC7413
int tfo_syn;
+#endif
#ifdef TCPDEBUG
/*
@@ -3020,8 +3022,12 @@
* case PRU_RCVD). If a FIN has already been received on this
* connection then we just ignore the text.
*/
+#ifdef TCP_RFC7413
tfo_syn = ((tp->t_state == TCPS_SYN_RECEIVED) &&
(tp->t_flags & TF_FASTOPEN));
+#else
+#define tfo_syn (false)
+#endif
if ((tlen || (thflags & TH_FIN) || tfo_syn) &&
TCPS_HAVERCVDFIN(tp->t_state) == 0) {
tcp_seq save_start = th->th_seq;
@@ -3245,6 +3251,9 @@
if (tp != NULL)
INP_WUNLOCK(tp->t_inpcb);
m_freem(m);
+#ifndef TCP_RFC7413
+#undef tfo_syn
+#endif
}
/*
Index: sys/netinet/tcp_var.h
===================================================================
--- sys/netinet/tcp_var.h
+++ sys/netinet/tcp_var.h
@@ -349,6 +349,12 @@
#define ENTER_RECOVERY(t_flags) t_flags |= (TF_CONGRECOVERY | TF_FASTRECOVERY)
#define EXIT_RECOVERY(t_flags) t_flags &= ~(TF_CONGRECOVERY | TF_FASTRECOVERY)
+#if defined(_KERNEL) && !defined(TCP_RFC7413)
+#define IS_FASTOPEN(t_flags) (false)
+#else
+#define IS_FASTOPEN(t_flags) (t_flags & TF_FASTOPEN)
+#endif
+
#define BYTES_THIS_ACK(tp, th) (th->th_ack - tp->snd_una)
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jun 14, 2:07 PM (6 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33954128
Default Alt Text
D8219.id21252.diff (1 KB)
Attached To
Mode
D8219: Remove TFO from the packet processing path when the kernel is not configured with TCP_RFC7413
Attached
Detach File
Event Timeline
Log In to Comment