summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_divert.h
diff options
context:
space:
mode:
authorzec <zec@FreeBSD.org>2009-08-24 10:06:02 +0000
committerzec <zec@FreeBSD.org>2009-08-24 10:06:02 +0000
commitfb1931d971247184022a15dd9f7150669e17efe6 (patch)
tree3b36d7af5cce53fb64e21bfb64e682c51df74cc1 /sys/netinet/ip_divert.h
parent7b5545dea038063a9bf4669788c65aec9feddb25 (diff)
downloadFreeBSD-src-fb1931d971247184022a15dd9f7150669e17efe6.zip
FreeBSD-src-fb1931d971247184022a15dd9f7150669e17efe6.tar.gz
Introduce a div_destroy() function which takes over per-vnet cleanup tasks
from the existing modevent / MOD_UNLOAD handler, and register div_destroy() in protosw as per-vnet .pr_destroy() handler for options VIMAGE builds. In nooptions VIMAGE builds, div_destroy() will be invoked from the modevent handler, resulting in effectively identical operation as it was prior this change. div_destroy() also tears down hashtables used by ipdivert, which were previously left behind on ipdivert kldunloads. For options VIMAGE builds only, temporarily disable kldunloading of ipdivert, because without introducing additional locking logic it is impossible to atomically check whether all ipdivert instances in all vnets are idle, and proceed with cleanup without opening a race window for a vnet to open an ipdivert socket while ipdivert tear-down is in progress. While here, staticize div_init(), because it is not used outside of ip_divert.c. In cooperation with: julian Approved by: re (rwatson), julian (mentor) MFC after: 3 days
Diffstat (limited to 'sys/netinet/ip_divert.h')
-rw-r--r--sys/netinet/ip_divert.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/sys/netinet/ip_divert.h b/sys/netinet/ip_divert.h
index 1bb0944..5036355 100644
--- a/sys/netinet/ip_divert.h
+++ b/sys/netinet/ip_divert.h
@@ -83,7 +83,6 @@ divert_find_info(struct mbuf *m)
typedef void ip_divert_packet_t(struct mbuf *m, int incoming);
extern ip_divert_packet_t *ip_divert_ptr;
-extern void div_init(void);
extern void div_input(struct mbuf *, int);
extern void div_ctlinput(int, struct sockaddr *, void *);
#endif /* _NETINET_IP_DIVERT_H_ */
OpenPOWER on IntegriCloud