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/netinet/igmp.c | |
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/netinet/igmp.c')
-rw-r--r-- | sys/netinet/igmp.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c index 6a7cb83..2c7ed2e 100644 --- a/sys/netinet/igmp.c +++ b/sys/netinet/igmp.c @@ -224,7 +224,10 @@ static VNET_DEFINE(int, current_state_timers_running); /* IGMPv1/v2 host #define V_current_state_timers_running VNET(current_state_timers_running) static VNET_DEFINE(LIST_HEAD(, igmp_ifinfo), igi_head); -static VNET_DEFINE(struct igmpstat, igmpstat); +static VNET_DEFINE(struct igmpstat, igmpstat) = { + .igps_version = IGPS_VERSION_3, + .igps_len = sizeof(struct igmpstat), +}; static VNET_DEFINE(struct timeval, igmp_gsrdelay) = {10, 0}; #define V_igi_head VNET(igi_head) @@ -3615,12 +3618,6 @@ vnet_igmp_iattach(const void *unused __unused) LIST_INIT(&V_igi_head); - /* - * Initialize sysctls to default values. - */ - V_igmpstat.igps_version = IGPS_VERSION_3; - V_igmpstat.igps_len = sizeof(struct igmpstat); - return (0); } @@ -3640,7 +3637,6 @@ vnet_igmp_idetach(const void *unused __unused) static vnet_modinfo_t vnet_igmp_modinfo = { .vmi_id = VNET_MOD_IGMP, .vmi_name = "igmp", - .vmi_dependson = VNET_MOD_INET, .vmi_iattach = vnet_igmp_iattach, .vmi_idetach = vnet_igmp_idetach }; |