Date: Fri, 3 Feb 2017 17:02:57 +0000 (UTC) From: Patrick Kelsey <pkelsey@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313168 - head/sys/netinet Message-ID: <201702031702.v13H2v8m085599@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702031702.v13H2v8m085599>