svn commit: r313168 - head/sys/netinet
Patrick Kelsey
pkelsey at FreeBSD.org
Fri Feb 3 17:02:58 UTC 2017
Author: pkelsey
Date: Fri Feb 3 17:02:57 2017
New Revision: 313168
URL: https://svnweb.freebsd.org/changeset/base/313168
Log:
Fix VIMAGE-related bugs in TFO. The autokey callout vnet context was
not being initialized, and the per-vnet fastopen context was only
being initialized for the default vnet.
PR: 216613
Reported by: Alex Deiter <alex dot deiter at gmail dot com>
MFC after: 1 week
Modified:
head/sys/netinet/tcp_fastopen.c
head/sys/netinet/tcp_subr.c
Modified: head/sys/netinet/tcp_fastopen.c
==============================================================================
--- head/sys/netinet/tcp_fastopen.c Fri Feb 3 16:57:14 2017 (r313167)
+++ head/sys/netinet/tcp_fastopen.c Fri Feb 3 17:02:57 2017 (r313168)
@@ -209,6 +209,7 @@ tcp_fastopen_init(void)
rm_init(&V_tcp_fastopen_keylock, "tfo_keylock");
callout_init_rm(&V_tcp_fastopen_autokey_ctx.c,
&V_tcp_fastopen_keylock, 0);
+ V_tcp_fastopen_autokey_ctx.v = curvnet;
V_tcp_fastopen_keys.newest = TCP_FASTOPEN_MAX_KEYS - 1;
}
Modified: head/sys/netinet/tcp_subr.c
==============================================================================
--- head/sys/netinet/tcp_subr.c Fri Feb 3 16:57:14 2017 (r313167)
+++ head/sys/netinet/tcp_subr.c Fri Feb 3 17:02:57 2017 (r313168)
@@ -679,6 +679,10 @@ tcp_init(void)
V_sack_hole_zone = uma_zcreate("sackhole", sizeof(struct sackhole),
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0);
+#ifdef TCP_RFC7413
+ tcp_fastopen_init();
+#endif
+
/* Skip initialization of globals for non-default instances. */
if (!IS_DEFAULT_VNET(curvnet))
return;
@@ -732,10 +736,6 @@ tcp_init(void)
#ifdef TCPPCAP
tcp_pcap_init();
#endif
-
-#ifdef TCP_RFC7413
- tcp_fastopen_init();
-#endif
}
#ifdef VIMAGE
More information about the svn-src-all
mailing list