diff options
author | bz <bz@FreeBSD.org> | 2016-06-01 10:14:04 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2016-06-01 10:14:04 +0000 |
commit | fac944a70a00eab9c2ba2b2e96df710bcfc78593 (patch) | |
tree | af4395ee554e65ffb7f0260620e5a4fe86961130 /sys/netinet/sctp_usrreq.c | |
parent | e6448344d4a588a7e0ec3874480c44ea1fe24be5 (diff) | |
download | FreeBSD-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/sctp_usrreq.c')
-rw-r--r-- | sys/netinet/sctp_usrreq.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c index 7b65d53..6e5cbe3 100644 --- a/sys/netinet/sctp_usrreq.c +++ b/sys/netinet/sctp_usrreq.c @@ -89,13 +89,14 @@ sctp_init(void) #endif } -void -sctp_finish(void) +#ifdef VIMAGE +static void +sctp_finish(void *unused __unused) { sctp_pcb_finish(); } - - +VNET_SYSUNINIT(sctp, SI_SUB_PROTO_DOMAIN, SI_ORDER_FOURTH, sctp_finish, NULL); +#endif void sctp_pathmtu_adjustment(struct sctp_tcb *stcb, uint16_t nxtsz) |