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
This commit is contained in:
Patrick Kelsey 2017-02-03 17:02:57 +00:00
parent bfe9bdb063
commit ec93ed8d95
2 changed files with 5 additions and 4 deletions

View file

@ -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;
}

View file

@ -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