From f2cf0121cae2ba825db03c0225cc63e41e641359 Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" <bz@FreeBSD.org> Date: Fri, 22 Jan 2016 18:22:03 +0000 Subject: [PATCH] MFp4 @180887: With pr_destroy being gone, call ip_destroy from an ordered VNET_SYSUNINT. Make ip_destroy() static. Sponsored by: The FreeBSD Foundation --- sys/netinet/ip_input.c | 6 ++++-- sys/netinet/ip_var.h | 3 --- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 6f25e08b33f0..d5a98ee48cd9 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -361,8 +361,8 @@ ip_init(void) } #ifdef VIMAGE -void -ip_destroy(void) +static void +ip_destroy(void *unused __unused) { int error; @@ -388,6 +388,8 @@ ip_destroy(void) /* Destroy IP reassembly queue. */ ipreass_destroy(); } + +VNET_SYSUNINIT(ip, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, ip_destroy, NULL); #endif #ifdef RSS diff --git a/sys/netinet/ip_var.h b/sys/netinet/ip_var.h index 755c7d74aaa4..847704fd1d7f 100644 --- a/sys/netinet/ip_var.h +++ b/sys/netinet/ip_var.h @@ -209,9 +209,6 @@ int ip_fragment(struct ip *ip, struct mbuf **m_frag, int mtu, u_long if_hwassist_flags); void ip_forward(struct mbuf *m, int srcrt); void ip_init(void); -#ifdef VIMAGE -void ip_destroy(void); -#endif extern int (*ip_mforward)(struct ip *, struct ifnet *, struct mbuf *, struct ip_moptions *);