diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-07-20 13:55:33 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-07-20 13:55:33 +0000 |
commit | d32e9e9901044568408ca4ef06315cfca9176870 (patch) | |
tree | 231030d22abc459d39df8da66a6762eaed12da1f /sys/netipsec | |
parent | d1ac98198b3b8168b7cd32bf3434b7dfdacb6f44 (diff) | |
download | FreeBSD-src-d32e9e9901044568408ca4ef06315cfca9176870.zip FreeBSD-src-d32e9e9901044568408ca4ef06315cfca9176870.tar.gz |
Garbage collect vnet module registrations that have neither constructors
nor destructors, as there's no actual work to do.
In most cases, the constructors weren't needed because of the existing
protocol initialization functions run by net_init_domain() as part of
VNET_MOD_NET, or they were eliminated when support for static
initialization of virtualized globals was added.
Garbage collect dependency references to modules without constructors or
destructors, notably VNET_MOD_INET and VNET_MOD_INET6.
Reviewed by: bz
Approved by: re (vimage blanket)
Diffstat (limited to 'sys/netipsec')
-rw-r--r-- | sys/netipsec/ipsec.c | 1 | ||||
-rw-r--r-- | sys/netipsec/xform_ipcomp.c | 11 | ||||
-rw-r--r-- | sys/netipsec/xform_ipip.c | 11 |
3 files changed, 0 insertions, 23 deletions
diff --git a/sys/netipsec/ipsec.c b/sys/netipsec/ipsec.c index 4a7001e..c393dce 100644 --- a/sys/netipsec/ipsec.c +++ b/sys/netipsec/ipsec.c @@ -245,7 +245,6 @@ static int ipsec_iattach(const void *); static const vnet_modinfo_t vnet_ipsec_modinfo = { .vmi_id = VNET_MOD_IPSEC, .vmi_name = "ipsec", - .vmi_dependson = VNET_MOD_INET, /* XXX revisit - INET6 ? */ .vmi_iattach = ipsec_iattach, }; #endif diff --git a/sys/netipsec/xform_ipcomp.c b/sys/netipsec/xform_ipcomp.c index 2ea83e0..3536e53 100644 --- a/sys/netipsec/xform_ipcomp.c +++ b/sys/netipsec/xform_ipcomp.c @@ -81,14 +81,6 @@ SYSCTL_VNET_STRUCT(_net_inet_ipcomp, IPSECCTL_STATS, static int ipcomp_input_cb(struct cryptop *crp); static int ipcomp_output_cb(struct cryptop *crp); -#ifdef VIMAGE -static const vnet_modinfo_t vnet_ipcomp_modinfo = { - .vmi_id = VNET_MOD_IPCOMP, - .vmi_name = "ipsec_ipcomp", - .vmi_dependson = VNET_MOD_IPSEC, -}; -#endif - struct comp_algo * ipcomp_algorithm_lookup(int alg) { @@ -604,9 +596,6 @@ ipcomp_attach(void) { xform_register(&ipcomp_xformsw); -#ifdef VIMAGE - vnet_mod_register(&vnet_ipcomp_modinfo); -#endif } SYSINIT(ipcomp_xform_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_MIDDLE, ipcomp_attach, NULL); diff --git a/sys/netipsec/xform_ipip.c b/sys/netipsec/xform_ipip.c index 8de23ec..891e16c 100644 --- a/sys/netipsec/xform_ipip.c +++ b/sys/netipsec/xform_ipip.c @@ -105,14 +105,6 @@ SYSCTL_VNET_STRUCT(_net_inet_ipip, IPSECCTL_STATS, static void _ipip_input(struct mbuf *m, int iphlen, struct ifnet *gifp); -#ifdef VIMAGE -static const vnet_modinfo_t vnet_ipip_modinfo = { - .vmi_id = VNET_MOD_IPIP, - .vmi_name = "ipsec_ipip", - .vmi_dependson = VNET_MOD_IPSEC, -}; -#endif - #ifdef INET6 /* * Really only a wrapper for ipip_input(), for use with IPv6. @@ -710,9 +702,6 @@ ipe4_attach(void) (void) encap_attach_func(AF_INET6, -1, ipe4_encapcheck, (struct protosw *)&ipe6_protosw, NULL); #endif -#ifdef VIMAGE - vnet_mod_register(&vnet_ipip_modinfo); -#endif } SYSINIT(ipe4_xform_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_MIDDLE, ipe4_attach, NULL); #endif /* IPSEC */ |