summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_subr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r--sys/netinet/tcp_subr.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index 489617b..fc49344 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -426,6 +426,25 @@ tcp_init(void)
EVENTHANDLER_PRI_ANY);
}
+#ifdef VIMAGE
+void
+tcp_destroy(void)
+{
+ INIT_VNET_INET(curvnet);
+
+ tcp_tw_destroy();
+ tcp_hc_destroy();
+ syncache_destroy();
+
+ /* XXX check that hashes are empty! */
+ hashdestroy(V_tcbinfo.ipi_hashbase, M_PCB,
+ V_tcbinfo.ipi_hashmask);
+ hashdestroy(V_tcbinfo.ipi_porthashbase, M_PCB,
+ V_tcbinfo.ipi_porthashmask);
+ INP_INFO_LOCK_DESTROY(&V_tcbinfo);
+}
+#endif
+
void
tcp_fini(void *xtp)
{
OpenPOWER on IntegriCloud