summaryrefslogtreecommitdiff
path: root/sys/netinet/udp_usrreq.c
diff options
context:
space:
mode:
authorMarko Zec <zec@FreeBSD.org>2009-06-08 17:15:40 +0000
committerMarko Zec <zec@FreeBSD.org>2009-06-08 17:15:40 +0000
commitbc29160df3d0b3a65d9b85a63a4589f1f9652e6b (patch)
tree7c00057a3f90cc6cfd121e2a6594d254fc72cba3 /sys/netinet/udp_usrreq.c
parent389cff511328e788e1a71dbb78154dd7d21b5fcc (diff)
Notes
Diffstat (limited to 'sys/netinet/udp_usrreq.c')
-rw-r--r--sys/netinet/udp_usrreq.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 33be911b0781..fdc96f4501ec 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -221,6 +221,20 @@ udp_discardcb(struct udpcb *up)
uma_zfree(V_udpcb_zone, up);
}
+#ifdef VIMAGE
+void
+udp_destroy(void)
+{
+ INIT_VNET_INET(curvnet);
+
+ hashdestroy(V_udbinfo.ipi_hashbase, M_PCB,
+ V_udbinfo.ipi_hashmask);
+ hashdestroy(V_udbinfo.ipi_porthashbase, M_PCB,
+ V_udbinfo.ipi_porthashmask);
+ INP_INFO_LOCK_DESTROY(&V_udbinfo);
+}
+#endif
+
/*
* Subroutine of udp_input(), which appends the provided mbuf chain to the
* passed pcb/socket. The caller must provide a sockaddr_in via udp_in that