summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_input.c
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2016-06-01 10:14:04 +0000
committerbz <bz@FreeBSD.org>2016-06-01 10:14:04 +0000
commitfac944a70a00eab9c2ba2b2e96df710bcfc78593 (patch)
treeaf4395ee554e65ffb7f0260620e5a4fe86961130 /sys/netinet/ip_input.c
parente6448344d4a588a7e0ec3874480c44ea1fe24be5 (diff)
downloadFreeBSD-src-fac944a70a00eab9c2ba2b2e96df710bcfc78593.zip
FreeBSD-src-fac944a70a00eab9c2ba2b2e96df710bcfc78593.tar.gz
The pr_destroy field does not allow us to run the teardown code in a
specific order. VNET_SYSUNINITs however are doing exactly that. Thus remove the VIMAGE conditional field from the domain(9) protosw structure and replace it with VNET_SYSUNINITs. This also allows us to change some order and to make the teardown functions file local static. Also convert divert(4) as it uses the same mechanism ip(4) and ip6(4) use internally. Slightly reshuffle the SI_SUB_* fields in kernel.h and add a new ones, e.g., for pfil consumers (firewalls), partially for this commit and for others to come. Reviewed by: gnn, tuexen (sctp), jhb (kernel.h) Obtained from: projects/vnet MFC after: 2 weeks X-MFC: do not remove pr_destroy Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6652
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r--sys/netinet/ip_input.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 773d7ae..9afb8d6 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
OpenPOWER on IntegriCloud