svn commit: r294566 - in projects/vnet/sys: contrib/ipfilter/netinet dev/usb/net kern net netinet netinet6 netipsec netpfil/ipfw netpfil/pf sys
Bjoern A. Zeeb
bz at FreeBSD.org
Fri Jan 22 15:00:06 UTC 2016
Author: bz
Date: Fri Jan 22 15:00:01 2016
New Revision: 294566
URL: https://svnweb.freebsd.org/changeset/base/294566
Log:
Just checkpoint the WIP in order to be able to make the tree update
easier. Note: this is currently not in a usable state as certain
teardown parts are not called and the DOMAIN rework is missing.
More to come soon and find its way to head.
Obtained from: P4 //depot/user/bz/vimage/...
Sponsored by: The FreeBSD Foundation
Modified:
projects/vnet/sys/contrib/ipfilter/netinet/mlfk_ipl.c
projects/vnet/sys/dev/usb/net/usb_ethernet.c
projects/vnet/sys/kern/kern_shutdown.c
projects/vnet/sys/kern/kern_timeout.c
projects/vnet/sys/kern/uipc_domain.c
projects/vnet/sys/net/if.c
projects/vnet/sys/net/if_disc.c
projects/vnet/sys/net/if_enc.c
projects/vnet/sys/net/pfil.c
projects/vnet/sys/net/vnet.c
projects/vnet/sys/netinet/igmp.c
projects/vnet/sys/netinet/in_proto.c
projects/vnet/sys/netinet/ip_divert.c
projects/vnet/sys/netinet/ip_mroute.c
projects/vnet/sys/netinet/ip_var.h
projects/vnet/sys/netinet/raw_ip.c
projects/vnet/sys/netinet/sctp_bsd_addr.c
projects/vnet/sys/netinet/sctp_pcb.c
projects/vnet/sys/netinet/sctp_usrreq.c
projects/vnet/sys/netinet/sctp_var.h
projects/vnet/sys/netinet/tcp_subr.c
projects/vnet/sys/netinet/tcp_var.h
projects/vnet/sys/netinet/udp_usrreq.c
projects/vnet/sys/netinet/udp_var.h
projects/vnet/sys/netinet6/in6.c
projects/vnet/sys/netinet6/in6_ifattach.c
projects/vnet/sys/netinet6/in6_ifattach.h
projects/vnet/sys/netinet6/in6_proto.c
projects/vnet/sys/netinet6/ip6_input.c
projects/vnet/sys/netinet6/ip6_mroute.c
projects/vnet/sys/netinet6/mld6.c
projects/vnet/sys/netinet6/nd6.c
projects/vnet/sys/netinet6/nd6.h
projects/vnet/sys/netipsec/ipsec.c
projects/vnet/sys/netipsec/xform_tcp.c
projects/vnet/sys/netpfil/ipfw/dn_sched.h
projects/vnet/sys/netpfil/ipfw/ip_dummynet.c
projects/vnet/sys/netpfil/ipfw/ip_fw2.c
projects/vnet/sys/netpfil/ipfw/ip_fw_nat.c
projects/vnet/sys/netpfil/pf/if_pfsync.c
projects/vnet/sys/netpfil/pf/pf_ioctl.c
projects/vnet/sys/sys/kernel.h
Modified: projects/vnet/sys/contrib/ipfilter/netinet/mlfk_ipl.c
==============================================================================
--- projects/vnet/sys/contrib/ipfilter/netinet/mlfk_ipl.c Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/contrib/ipfilter/netinet/mlfk_ipl.c Fri Jan 22 15:00:01 2016 (r294566)
@@ -287,7 +287,7 @@ static moduledata_t ipfiltermod = {
};
-DECLARE_MODULE(ipfilter, ipfiltermod, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY);
+DECLARE_MODULE(ipfilter, ipfiltermod, SI_SUB_FW, SI_ORDER_ANY);
#ifdef MODULE_VERSION
MODULE_VERSION(ipfilter, 1);
#endif
Modified: projects/vnet/sys/dev/usb/net/usb_ethernet.c
==============================================================================
--- projects/vnet/sys/dev/usb/net/usb_ethernet.c Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/dev/usb/net/usb_ethernet.c Fri Jan 22 15:00:01 2016 (r294566)
@@ -641,5 +641,9 @@ uether_rxflush(struct usb_ether *ue)
}
}
-DECLARE_MODULE(uether, uether_mod, SI_SUB_PSEUDO, SI_ORDER_ANY);
+/*
+ * USB net drivers are run by DRIVER_MODULE() thus SI_SUB_DRIVERS,
+ * SI_ORDER_MIDDLE. Run uether after that.
+ */
+DECLARE_MODULE(uether, uether_mod, SI_SUB_DRIVERS, SI_ORDER_ANY);
MODULE_VERSION(uether, 1);
Modified: projects/vnet/sys/kern/kern_shutdown.c
==============================================================================
--- projects/vnet/sys/kern/kern_shutdown.c Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/kern/kern_shutdown.c Fri Jan 22 15:00:01 2016 (r294566)
@@ -899,3 +899,14 @@ mkdumpheader(struct kerneldumpheader *kd
strlcpy(kdh->panicstring, panicstr, sizeof(kdh->panicstring));
kdh->parity = kerneldump_parity(kdh);
}
+
+#ifdef DDB
+DB_SHOW_COMMAND(panic, db_show_panic)
+{
+
+ if (panicstr == NULL)
+ db_printf("Not paniced\n");
+ else
+ db_printf("panic: %s\n", panicstr);
+}
+#endif
Modified: projects/vnet/sys/kern/kern_timeout.c
==============================================================================
--- projects/vnet/sys/kern/kern_timeout.c Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/kern/kern_timeout.c Fri Jan 22 15:00:01 2016 (r294566)
@@ -38,6 +38,7 @@
__FBSDID("$FreeBSD$");
#include "opt_callout_profiling.h"
+#include "opt_ddb.h"
#if defined(__arm__)
#include "opt_timer.h"
#endif
@@ -60,6 +61,11 @@ __FBSDID("$FreeBSD$");
#include <sys/sysctl.h>
#include <sys/smp.h>
+#ifdef DDB
+#include <ddb/ddb.h>
+#include <machine/_inttypes.h>
+#endif
+
#ifdef SMP
#include <machine/cpu.h>
#endif
@@ -1615,3 +1621,35 @@ SYSCTL_PROC(_kern, OID_AUTO, callout_sta
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE,
0, 0, sysctl_kern_callout_stat, "I",
"Dump immediate statistic snapshot of the scheduled callouts");
+
+#ifdef DDB
+
+static void
+_show_callout(struct callout *c)
+{
+
+ db_printf("callout %p\n", c);
+#define C_DB_PRINTF(f, e) db_printf(" %s = " f "\n", #e, c->e);
+ db_printf(" &c_links = %p\n", &(c->c_links));
+ C_DB_PRINTF("%" PRId64, c_time);
+ C_DB_PRINTF("%" PRId64, c_precision);
+ C_DB_PRINTF("%p", c_arg);
+ C_DB_PRINTF("%p", c_func);
+ C_DB_PRINTF("%p", c_lock);
+ C_DB_PRINTF("%#x", c_flags);
+ C_DB_PRINTF("%#x", c_iflags);
+ C_DB_PRINTF("%d", c_cpu);
+#undef C_DB_PRINTF
+}
+
+DB_SHOW_COMMAND(callout, db_show_callout)
+{
+
+ if (!have_addr) {
+ db_printf("usage: show callout <struct callout *>\n");
+ return;
+ }
+
+ _show_callout((struct callout *)addr);
+}
+#endif /* DDB */
Modified: projects/vnet/sys/kern/uipc_domain.c
==============================================================================
--- projects/vnet/sys/kern/uipc_domain.c Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/kern/uipc_domain.c Fri Jan 22 15:00:01 2016 (r294566)
@@ -198,8 +198,12 @@ vnet_domain_uninit(void *arg)
struct protosw *pr;
for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++)
- if (pr->pr_destroy)
+ if (pr->pr_destroy) {
+#ifdef INVARIANTS
+ printf("%s: pr %p called pr_destroy\n", __func__, pr);
+#endif
(*pr->pr_destroy)();
+ }
if (dp->dom_destroy)
(*dp->dom_destroy)();
}
Modified: projects/vnet/sys/net/if.c
==============================================================================
--- projects/vnet/sys/net/if.c Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/net/if.c Fri Jan 22 15:00:01 2016 (r294566)
@@ -384,6 +384,26 @@ vnet_if_uninit(const void *unused __unus
}
VNET_SYSUNINIT(vnet_if_uninit, SI_SUB_INIT_IF, SI_ORDER_FIRST,
vnet_if_uninit, NULL);
+
+/*
+ * XXX-BZ VNET; probably along with dom stuff.
+ * This is very wrong but MC currently implies that interfaces are
+ * gone before we can free it. This needs to be fied differently
+ * and this needs to be moved back to SI_SUB_INIT_IF.
+ */
+static void
+vnet_if_return(const void *unused __unused)
+{
+ struct ifnet *ifp, *nifp;
+
+ /* Return all inherited interfaces to their parent vnets. */
+ TAILQ_FOREACH_SAFE(ifp, &V_ifnet, if_link, nifp) {
+ if (ifp->if_home_vnet != ifp->if_vnet)
+ if_vmove(ifp, ifp->if_home_vnet);
+ }
+}
+VNET_SYSUNINIT(vnet_if_return, SI_SUB_VNET_DONE, SI_ORDER_ANY,
+ vnet_if_return, NULL);
#endif
static void
@@ -821,6 +841,7 @@ if_purgeaddrs(struct ifnet *ifp)
{
struct ifaddr *ifa, *next;
+ /* XXX IF_ADDR_R/WLOCK */
TAILQ_FOREACH_SAFE(ifa, &ifp->if_addrhead, ifa_link, next) {
if (ifa->ifa_addr->sa_family == AF_LINK)
continue;
@@ -845,7 +866,9 @@ if_purgeaddrs(struct ifnet *ifp)
continue;
}
#endif /* INET6 */
+ IF_ADDR_WLOCK(ifp);
TAILQ_REMOVE(&ifp->if_addrhead, ifa, ifa_link);
+ IF_ADDR_WUNLOCK(ifp);
ifa_free(ifa);
}
}
@@ -979,7 +1002,9 @@ if_detach_internal(struct ifnet *ifp, in
/* We can now free link ifaddr. */
if (!TAILQ_EMPTY(&ifp->if_addrhead)) {
ifa = TAILQ_FIRST(&ifp->if_addrhead);
+ IF_ADDR_WLOCK(ifp);
TAILQ_REMOVE(&ifp->if_addrhead, ifa, ifa_link);
+ IF_ADDR_WUNLOCK(ifp);
ifa_free(ifa);
}
}
@@ -1285,7 +1310,7 @@ if_delgroups(struct ifnet *ifp)
strlcpy(groupname, ifgl->ifgl_group->ifg_group, IFNAMSIZ);
IF_ADDR_WLOCK(ifp);
- TAILQ_REMOVE(&ifp->if_groups, ifgl, ifgl_next);
+ TAILQ_REMOVE(&ifp->if_groups, ifgl, ifgl_next); // <<<<
IF_ADDR_WUNLOCK(ifp);
TAILQ_FOREACH(ifgm, &ifgl->ifgl_group->ifg_members, ifgm_next)
Modified: projects/vnet/sys/net/if_disc.c
==============================================================================
--- projects/vnet/sys/net/if_disc.c Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/net/if_disc.c Fri Jan 22 15:00:01 2016 (r294566)
@@ -137,7 +137,7 @@ vnet_disc_init(const void *unused __unus
V_disc_cloner = if_clone_simple(discname, disc_clone_create,
disc_clone_destroy, 0);
}
-VNET_SYSINIT(vnet_disc_init, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY,
+VNET_SYSINIT(vnet_disc_init, SI_SUB_PSEUDO, SI_ORDER_ANY,
vnet_disc_init, NULL);
static void
@@ -146,7 +146,7 @@ vnet_disc_uninit(const void *unused __un
if_clone_detach(V_disc_cloner);
}
-VNET_SYSUNINIT(vnet_disc_uninit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY,
+VNET_SYSUNINIT(vnet_disc_uninit, SI_SUB_PSEUDO, SI_ORDER_ANY,
vnet_disc_uninit, NULL);
static int
Modified: projects/vnet/sys/net/if_enc.c
==============================================================================
--- projects/vnet/sys/net/if_enc.c Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/net/if_enc.c Fri Jan 22 15:00:01 2016 (r294566)
@@ -369,7 +369,7 @@ vnet_enc_init(const void *unused __unuse
V_enc_cloner = if_clone_simple(encname, enc_clone_create,
enc_clone_destroy, 1);
}
-VNET_SYSINIT(vnet_enc_init, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY,
+VNET_SYSINIT(vnet_enc_init, SI_SUB_PSEUDO, SI_ORDER_ANY,
vnet_enc_init, NULL);
static void
@@ -378,7 +378,7 @@ vnet_enc_uninit(const void *unused __unu
if_clone_detach(V_enc_cloner);
}
-VNET_SYSUNINIT(vnet_enc_uninit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY,
+VNET_SYSUNINIT(vnet_enc_uninit, SI_SUB_PSEUDO, SI_ORDER_ANY,
vnet_enc_uninit, NULL);
static int
@@ -401,4 +401,4 @@ static moduledata_t enc_mod = {
0
};
-DECLARE_MODULE(if_enc, enc_mod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY);
+DECLARE_MODULE(if_enc, enc_mod, SI_SUB_PSEUDO, SI_ORDER_ANY);
Modified: projects/vnet/sys/net/pfil.c
==============================================================================
--- projects/vnet/sys/net/pfil.c Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/net/pfil.c Fri Jan 22 15:00:01 2016 (r294566)
@@ -363,39 +363,34 @@ pfil_chain_remove(pfil_chain_t *chain, p
* Stuff that must be initialized for every instance (including the first of
* course).
*/
-static int
+static void
vnet_pfil_init(const void *unused)
{
LIST_INIT(&V_pfil_head_list);
PFIL_LOCK_INIT_REAL(&V_pfil_lock, "shared");
- return (0);
}
/*
* Called for the removal of each instance.
*/
-static int
+static void
vnet_pfil_uninit(const void *unused)
{
- KASSERT(LIST_EMPTY(&V_pfil_head_list),
+ VNET_ASSERT(LIST_EMPTY(&V_pfil_head_list),
("%s: pfil_head_list %p not empty", __func__, &V_pfil_head_list));
PFIL_LOCK_DESTROY_REAL(&V_pfil_lock);
- return (0);
}
-/* Define startup order. */
-#define PFIL_SYSINIT_ORDER SI_SUB_PROTO_BEGIN
-#define PFIL_MODEVENT_ORDER (SI_ORDER_FIRST) /* On boot slot in here. */
-#define PFIL_VNET_ORDER (PFIL_MODEVENT_ORDER + 2) /* Later still. */
-
/*
* Starting up.
*
* VNET_SYSINIT is called for each existing vnet and each new vnet.
+ * Make sure the pfil bits are first before any possible subsystem which
+ * might piggyback on the SI_SUB_PROTO_PFIL.
*/
-VNET_SYSINIT(vnet_pfil_init, PFIL_SYSINIT_ORDER, PFIL_VNET_ORDER,
+VNET_SYSINIT(vnet_pfil_init, SI_SUB_PROTO_PFIL, SI_ORDER_FIRST,
vnet_pfil_init, NULL);
/*
@@ -403,5 +398,5 @@ VNET_SYSINIT(vnet_pfil_init, PFIL_SYSINI
*
* VNET_SYSUNINIT is called for each exiting vnet as it exits.
*/
-VNET_SYSUNINIT(vnet_pfil_uninit, PFIL_SYSINIT_ORDER, PFIL_VNET_ORDER,
+VNET_SYSUNINIT(vnet_pfil_uninit, SI_SUB_PROTO_PFIL, SI_ORDER_FIRST,
vnet_pfil_uninit, NULL);
Modified: projects/vnet/sys/net/vnet.c
==============================================================================
--- projects/vnet/sys/net/vnet.c Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/net/vnet.c Fri Jan 22 15:00:01 2016 (r294566)
@@ -269,7 +269,6 @@ vnet_alloc(void)
void
vnet_destroy(struct vnet *vnet)
{
- struct ifnet *ifp, *nifp;
SDT_PROBE2(vnet, functions, vnet_destroy, entry, __LINE__, vnet);
KASSERT(vnet->vnet_sockcnt == 0,
@@ -280,13 +279,6 @@ vnet_destroy(struct vnet *vnet)
VNET_LIST_WUNLOCK();
CURVNET_SET_QUIET(vnet);
-
- /* Return all inherited interfaces to their parent vnets. */
- TAILQ_FOREACH_SAFE(ifp, &V_ifnet, if_link, nifp) {
- if (ifp->if_home_vnet != ifp->if_vnet)
- if_vmove(ifp, ifp->if_home_vnet);
- }
-
vnet_sysuninit();
CURVNET_RESTORE();
Modified: projects/vnet/sys/netinet/igmp.c
==============================================================================
--- projects/vnet/sys/netinet/igmp.c Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/netinet/igmp.c Fri Jan 22 15:00:01 2016 (r294566)
@@ -50,6 +50,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "opt_ddb.h"
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/module.h>
@@ -64,6 +66,10 @@ __FBSDID("$FreeBSD$");
#include <sys/ktr.h>
#include <sys/condvar.h>
+#ifdef DDB
+#include <ddb/ddb.h>
+#endif
+
#include <net/if.h>
#include <net/if_var.h>
#include <net/netisr.h>
@@ -221,7 +227,8 @@ static VNET_DEFINE(int, current_state_ti
#define V_state_change_timers_running VNET(state_change_timers_running)
#define V_current_state_timers_running VNET(current_state_timers_running)
-static VNET_DEFINE(LIST_HEAD(, igmp_ifsoftc), igi_head);
+static VNET_DEFINE(LIST_HEAD(, igmp_ifsoftc), igi_head) =
+ LIST_HEAD_INITIALIZER(igi_head);
static VNET_DEFINE(struct igmpstat, igmpstat) = {
.igps_version = IGPS_VERSION_3,
.igps_len = sizeof(struct igmpstat),
@@ -659,16 +666,12 @@ igmp_ifdetach(struct ifnet *ifp)
void
igmp_domifdetach(struct ifnet *ifp)
{
- struct igmp_ifsoftc *igi;
CTR3(KTR_IGMPV3, "%s: called for ifp %p(%s)",
__func__, ifp, ifp->if_xname);
IGMP_LOCK();
-
- igi = ((struct in_ifinfo *)ifp->if_afdata[AF_INET])->ii_igmp;
igi_delete_locked(ifp);
-
IGMP_UNLOCK();
}
@@ -3593,70 +3596,74 @@ igmp_rec_type_to_str(const int type)
}
#endif
+#ifdef VIMAGE
static void
-igmp_init(void *unused __unused)
-{
-
- CTR1(KTR_IGMPV3, "%s: initializing", __func__);
-
- IGMP_LOCK_INIT();
-
- m_raopt = igmp_ra_alloc();
-
- netisr_register(&igmp_nh);
-}
-SYSINIT(igmp_init, SI_SUB_PSEUDO, SI_ORDER_MIDDLE, igmp_init, NULL);
-
-static void
-igmp_uninit(void *unused __unused)
+vnet_igmp_uninit(const void *unused __unused)
{
CTR1(KTR_IGMPV3, "%s: tearing down", __func__);
- netisr_unregister(&igmp_nh);
-
- m_free(m_raopt);
- m_raopt = NULL;
-
- IGMP_LOCK_DESTROY();
+ VNET_ASSERT(LIST_EMPTY(&V_igi_head),
+ ("%s: igi list %p not empty; ifnets not detached?", __func__,
+ &V_igi_head));
}
-SYSUNINIT(igmp_uninit, SI_SUB_PSEUDO, SI_ORDER_MIDDLE, igmp_uninit, NULL);
-
-static void
-vnet_igmp_init(const void *unused __unused)
-{
-
- CTR1(KTR_IGMPV3, "%s: initializing", __func__);
-
- LIST_INIT(&V_igi_head);
-}
-VNET_SYSINIT(vnet_igmp_init, SI_SUB_PSEUDO, SI_ORDER_ANY, vnet_igmp_init,
- NULL);
+VNET_SYSUNINIT(vnet_igmp_uninit, SI_SUB_PROTO_MC, SI_ORDER_ANY,
+ vnet_igmp_uninit, NULL);
+#endif
-static void
-vnet_igmp_uninit(const void *unused __unused)
+#ifdef DDB
+DB_SHOW_COMMAND(igi_list, db_show_igi_list)
{
+ struct igmp_ifsoftc *igi, *tigi;
+ LIST_HEAD(_igi_list, igmp_ifsoftc) *igi_head;
- CTR1(KTR_IGMPV3, "%s: tearing down", __func__);
-
- KASSERT(LIST_EMPTY(&V_igi_head),
- ("%s: igi list not empty; ifnets not detached?", __func__));
+ if (!have_addr) {
+ db_printf("usage: show igi_list <addr>\n");
+ return;
+ }
+ igi_head = (struct _igi_list *)addr;
+
+ LIST_FOREACH_SAFE(igi, igi_head, igi_link, tigi) {
+ db_printf("igmp_ifsoftc %p:\n", igi);
+ db_printf(" ifp %p\n", igi->igi_ifp);
+ db_printf(" version %u\n", igi->igi_version);
+ db_printf(" v1_timer %u\n", igi->igi_v1_timer);
+ db_printf(" v2_timer %u\n", igi->igi_v2_timer);
+ db_printf(" v3_timer %u\n", igi->igi_v3_timer);
+ db_printf(" flags %#x\n", igi->igi_flags);
+ db_printf(" rv %u\n", igi->igi_rv);
+ db_printf(" qi %u\n", igi->igi_qi);
+ db_printf(" qri %u\n", igi->igi_qri);
+ db_printf(" uri %u\n", igi->igi_uri);
+ /* SLIST_HEAD(,in_multi) igi_relinmhead */
+ /* struct mbufq igi_gq; */
+ db_printf("\n");
+ }
}
-VNET_SYSUNINIT(vnet_igmp_uninit, SI_SUB_PSEUDO, SI_ORDER_ANY,
- vnet_igmp_uninit, NULL);
+#endif
static int
igmp_modevent(module_t mod, int type, void *unused __unused)
{
- switch (type) {
- case MOD_LOAD:
- case MOD_UNLOAD:
- break;
- default:
- return (EOPNOTSUPP);
- }
- return (0);
+ switch (type) {
+ case MOD_LOAD:
+ CTR1(KTR_IGMPV3, "%s: initializing", __func__);
+ IGMP_LOCK_INIT();
+ m_raopt = igmp_ra_alloc();
+ netisr_register(&igmp_nh);
+ break;
+ case MOD_UNLOAD:
+ CTR1(KTR_IGMPV3, "%s: tearing down", __func__);
+ netisr_unregister(&igmp_nh);
+ m_free(m_raopt);
+ m_raopt = NULL;
+ IGMP_LOCK_DESTROY();
+ break;
+ default:
+ return (EOPNOTSUPP);
+ }
+ return (0);
}
static moduledata_t igmp_mod = {
@@ -3664,4 +3671,4 @@ static moduledata_t igmp_mod = {
igmp_modevent,
0
};
-DECLARE_MODULE(igmp, igmp_mod, SI_SUB_PSEUDO, SI_ORDER_ANY);
+DECLARE_MODULE(igmp, igmp_mod, SI_SUB_PROTO_MC, SI_ORDER_ANY);
Modified: projects/vnet/sys/netinet/in_proto.c
==============================================================================
--- projects/vnet/sys/netinet/in_proto.c Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/netinet/in_proto.c Fri Jan 22 15:00:01 2016 (r294566)
@@ -118,9 +118,6 @@ struct protosw inetsw[] = {
.pr_domain = &inetdomain,
.pr_protocol = IPPROTO_IP,
.pr_init = ip_init,
-#ifdef VIMAGE
- .pr_destroy = ip_destroy,
-#endif
.pr_slowtimo = ip_slowtimo,
.pr_drain = ip_drain,
.pr_usrreqs = &nousrreqs
@@ -134,9 +131,6 @@ struct protosw inetsw[] = {
.pr_ctlinput = udp_ctlinput,
.pr_ctloutput = udp_ctloutput,
.pr_init = udp_init,
-#ifdef VIMAGE
- .pr_destroy = udp_destroy,
-#endif
.pr_usrreqs = &udp_usrreqs
},
{
@@ -148,9 +142,6 @@ struct protosw inetsw[] = {
.pr_ctlinput = tcp_ctlinput,
.pr_ctloutput = tcp_ctloutput,
.pr_init = tcp_init,
-#ifdef VIMAGE
- .pr_destroy = tcp_destroy,
-#endif
.pr_slowtimo = tcp_slowtimo,
.pr_drain = tcp_drain,
.pr_usrreqs = &tcp_usrreqs
@@ -165,9 +156,6 @@ struct protosw inetsw[] = {
.pr_ctlinput = sctp_ctlinput,
.pr_ctloutput = sctp_ctloutput,
.pr_init = sctp_init,
-#ifdef VIMAGE
- .pr_destroy = sctp_finish,
-#endif
.pr_drain = sctp_drain,
.pr_usrreqs = &sctp_usrreqs
},
@@ -192,9 +180,6 @@ struct protosw inetsw[] = {
.pr_ctlinput = udplite_ctlinput,
.pr_ctloutput = udp_ctloutput,
.pr_init = udplite_init,
-#ifdef VIMAGE
- .pr_destroy = udplite_destroy,
-#endif
.pr_usrreqs = &udp_usrreqs
},
{
@@ -342,9 +327,6 @@ IPPROTOSPACER,
.pr_input = rip_input,
.pr_ctloutput = rip_ctloutput,
.pr_init = rip_init,
-#ifdef VIMAGE
- .pr_destroy = rip_destroy,
-#endif
.pr_usrreqs = &rip_usrreqs
},
};
Modified: projects/vnet/sys/netinet/ip_divert.c
==============================================================================
--- projects/vnet/sys/netinet/ip_divert.c Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/netinet/ip_divert.c Fri Jan 22 15:00:01 2016 (r294566)
@@ -168,6 +168,8 @@ div_destroy(void)
in_pcbinfo_destroy(&V_divcbinfo);
}
+VNET_SYSUNINIT(divert, SI_SUB_PROTO_DOMAININIT, SI_ORDER_ANY,
+ div_destroy, NULL);
/*
* IPPROTO_DIVERT is not in the real IP protocol number space; this
@@ -756,9 +758,6 @@ struct protosw div_protosw = {
.pr_ctlinput = div_ctlinput,
.pr_ctloutput = ip_ctloutput,
.pr_init = div_init,
-#ifdef VIMAGE
- .pr_destroy = div_destroy,
-#endif
.pr_usrreqs = &div_usrreqs
};
@@ -766,9 +765,7 @@ static int
div_modevent(module_t mod, int type, void *unused)
{
int err = 0;
-#ifndef VIMAGE
int n;
-#endif
switch (type) {
case MOD_LOAD:
@@ -793,10 +790,6 @@ div_modevent(module_t mod, int type, voi
err = EPERM;
break;
case MOD_UNLOAD:
-#ifdef VIMAGE
- err = EPERM;
- break;
-#else
/*
* Forced unload.
*
@@ -821,7 +814,6 @@ div_modevent(module_t mod, int type, voi
div_destroy();
EVENTHANDLER_DEREGISTER(maxsockets_change, ip_divert_event_tag);
break;
-#endif /* !VIMAGE */
default:
err = EOPNOTSUPP;
break;
@@ -835,6 +827,6 @@ static moduledata_t ipdivertmod = {
0
};
-DECLARE_MODULE(ipdivert, ipdivertmod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY);
+DECLARE_MODULE(ipdivert, ipdivertmod, SI_SUB_FW, SI_ORDER_ANY);
MODULE_DEPEND(ipdivert, ipfw, 3, 3, 3);
MODULE_VERSION(ipdivert, 1);
Modified: projects/vnet/sys/netinet/ip_mroute.c
==============================================================================
--- projects/vnet/sys/netinet/ip_mroute.c Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/netinet/ip_mroute.c Fri Jan 22 15:00:01 2016 (r294566)
@@ -2821,7 +2821,7 @@ vnet_mroute_init(const void *unused __un
callout_init(&V_bw_meter_ch, 1);
}
-VNET_SYSINIT(vnet_mroute_init, SI_SUB_PSEUDO, SI_ORDER_ANY, vnet_mroute_init,
+VNET_SYSINIT(vnet_mroute_init, SI_SUB_PROTO_MC, SI_ORDER_ANY, vnet_mroute_init,
NULL);
static void
@@ -2832,7 +2832,7 @@ vnet_mroute_uninit(const void *unused __
V_nexpire = NULL;
}
-VNET_SYSUNINIT(vnet_mroute_uninit, SI_SUB_PSEUDO, SI_ORDER_MIDDLE,
+VNET_SYSUNINIT(vnet_mroute_uninit, SI_SUB_PROTO_MC, SI_ORDER_MIDDLE,
vnet_mroute_uninit, NULL);
static int
@@ -2945,4 +2945,4 @@ static moduledata_t ip_mroutemod = {
0
};
-DECLARE_MODULE(ip_mroute, ip_mroutemod, SI_SUB_PSEUDO, SI_ORDER_MIDDLE);
+DECLARE_MODULE(ip_mroute, ip_mroutemod, SI_SUB_PROTO_MC, SI_ORDER_MIDDLE);
Modified: projects/vnet/sys/netinet/ip_var.h
==============================================================================
--- projects/vnet/sys/netinet/ip_var.h Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/netinet/ip_var.h Fri Jan 22 15:00:01 2016 (r294566)
@@ -229,9 +229,6 @@ void ip_fillid(struct ip *);
int rip_ctloutput(struct socket *, struct sockopt *);
void rip_ctlinput(int, struct sockaddr *, void *);
void rip_init(void);
-#ifdef VIMAGE
-void rip_destroy(void);
-#endif
int rip_input(struct mbuf **, int *, int);
int rip_output(struct mbuf *, struct socket *, ...);
int ipip_input(struct mbuf **, int *, int);
Modified: projects/vnet/sys/netinet/raw_ip.c
==============================================================================
--- projects/vnet/sys/netinet/raw_ip.c Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/netinet/raw_ip.c Fri Jan 22 15:00:01 2016 (r294566)
@@ -215,12 +215,13 @@ rip_init(void)
}
#ifdef VIMAGE
-void
+static void
rip_destroy(void)
{
in_pcbinfo_destroy(&V_ripcbinfo);
}
+VNET_SYSUNINIT(raw_ip, SI_SUB_PROTO_DOMAIN, SI_ORDER_FOURTH, rip_destroy, NULL);
#endif
#ifdef INET
Modified: projects/vnet/sys/netinet/sctp_bsd_addr.c
==============================================================================
--- projects/vnet/sys/netinet/sctp_bsd_addr.c Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/netinet/sctp_bsd_addr.c Fri Jan 22 15:00:01 2016 (r294566)
@@ -293,6 +293,9 @@ sctp_addr_change(struct ifaddr *ifa, int
{
uint32_t ifa_flags = 0;
+ if (SCTP_BASE_VAR(sctp_pcb_initialized) == 0)
+ return;
+
/*
* BSD only has one VRF, if this changes we will need to hook in the
* right things here to get the id to pass to the address managment
Modified: projects/vnet/sys/netinet/sctp_pcb.c
==============================================================================
--- projects/vnet/sys/netinet/sctp_pcb.c Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/netinet/sctp_pcb.c Fri Jan 22 15:00:01 2016 (r294566)
@@ -5927,12 +5927,34 @@ sctp_pcb_finish(void)
int i;
struct sctp_iterator *it, *nit;
+ if (SCTP_BASE_VAR(sctp_pcb_initialized) == 0) {
+ printf("%s: race condition on teardown.\n", __func__);
+ return;
+ }
+ SCTP_BASE_VAR(sctp_pcb_initialized) = 0;
+
/*
* In FreeBSD the iterator thread never exits but we do clean up.
* The only way FreeBSD reaches here is if we have VRF's but we
* still add the ifdef to make it compile on old versions.
*/
+retry:
+ while (sctp_it_ctl.iterator_running != 0)
+ DELAY(1);
SCTP_IPI_ITERATOR_WQ_LOCK();
+ /*
+ * sctp_iterator_worker() might be working on an it entry without
+ * holding the lock. We won't find it on the list either and
+ * continue and free/destroy it. While holding the lock, spin, to
+ * avoid the race condition as sctp_iterator_worker() will have to
+ * wait to re-aquire the lock.
+ */
+ if (sctp_it_ctl.cur_it != NULL || sctp_it_ctl.iterator_running != 0) {
+ SCTP_IPI_ITERATOR_WQ_UNLOCK();
+ printf("%s: Iterator running while we held the lock. Retry.\n",
+ __func__);
+ goto retry;
+ }
TAILQ_FOREACH_SAFE(it, &sctp_it_ctl.iteratorhead, sctp_nxt_itr, nit) {
if (it->vn != curvnet) {
continue;
@@ -5950,7 +5972,7 @@ sctp_pcb_finish(void)
sctp_it_ctl.iterator_flags |= SCTP_ITERATOR_STOP_CUR_IT;
}
SCTP_ITERATOR_UNLOCK();
- SCTP_OS_TIMER_STOP(&SCTP_BASE_INFO(addr_wq_timer.timer));
+ SCTP_OS_TIMER_STOP_DRAIN(&SCTP_BASE_INFO(addr_wq_timer.timer));
SCTP_WQ_ADDR_LOCK();
LIST_FOREACH_SAFE(wi, &SCTP_BASE_INFO(addr_wq), sctp_nxt_addr, nwi) {
LIST_REMOVE(wi, sctp_nxt_addr);
Modified: projects/vnet/sys/netinet/sctp_usrreq.c
==============================================================================
--- projects/vnet/sys/netinet/sctp_usrreq.c Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/netinet/sctp_usrreq.c Fri Jan 22 15:00:01 2016 (r294566)
@@ -89,12 +89,12 @@ sctp_init(void)
#endif
}
-void
+static void
sctp_finish(void)
{
sctp_pcb_finish();
}
-
+VNET_SYSUNINIT(sctp, SI_SUB_PROTO_DOMAIN, SI_ORDER_FOURTH, sctp_finish, NULL);
void
Modified: projects/vnet/sys/netinet/sctp_var.h
==============================================================================
--- projects/vnet/sys/netinet/sctp_var.h Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/netinet/sctp_var.h Fri Jan 22 15:00:01 2016 (r294566)
@@ -333,7 +333,6 @@ int sctp_input(struct mbuf **, int *, in
void sctp_pathmtu_adjustment(struct sctp_tcb *, uint16_t);
void sctp_drain(void);
void sctp_init(void);
-void sctp_finish(void);
int sctp_flush(struct socket *, int);
int sctp_shutdown(struct socket *);
void
Modified: projects/vnet/sys/netinet/tcp_subr.c
==============================================================================
--- projects/vnet/sys/netinet/tcp_subr.c Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/netinet/tcp_subr.c Fri Jan 22 15:00:01 2016 (r294566)
@@ -714,7 +714,7 @@ tcp_init(void)
}
#ifdef VIMAGE
-void
+static void
tcp_destroy(void)
{
int error;
@@ -742,6 +742,7 @@ tcp_destroy(void)
HHOOK_TYPE_TCP, HHOOK_TCP_EST_OUT, error);
}
}
+VNET_SYSUNINIT(tcp, SI_SUB_PROTO_DOMAIN, SI_ORDER_FOURTH, tcp_destroy, NULL);
#endif
void
Modified: projects/vnet/sys/netinet/tcp_var.h
==============================================================================
--- projects/vnet/sys/netinet/tcp_var.h Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/netinet/tcp_var.h Fri Jan 22 15:00:01 2016 (r294566)
@@ -736,9 +736,6 @@ struct tcpcb *
tcp_drop(struct tcpcb *, int);
void tcp_drain(void);
void tcp_init(void);
-#ifdef VIMAGE
-void tcp_destroy(void);
-#endif
void tcp_fini(void *);
char *tcp_log_addrs(struct in_conninfo *, struct tcphdr *, void *,
const void *);
Modified: projects/vnet/sys/netinet/udp_usrreq.c
==============================================================================
--- projects/vnet/sys/netinet/udp_usrreq.c Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/netinet/udp_usrreq.c Fri Jan 22 15:00:01 2016 (r294566)
@@ -269,20 +269,23 @@ udp_discardcb(struct udpcb *up)
}
#ifdef VIMAGE
-void
+static void
udp_destroy(void)
{
in_pcbinfo_destroy(&V_udbinfo);
uma_zdestroy(V_udpcb_zone);
}
+VNET_SYSUNINIT(udp, SI_SUB_PROTO_DOMAIN, SI_ORDER_FOURTH, udp_destroy, NULL);
-void
+static void
udplite_destroy(void)
{
in_pcbinfo_destroy(&V_ulitecbinfo);
}
+VNET_SYSUNINIT(udplite, SI_SUB_PROTO_DOMAIN, SI_ORDER_FOURTH, udplite_destroy,
+ NULL);
#endif
#ifdef INET
Modified: projects/vnet/sys/netinet/udp_var.h
==============================================================================
--- projects/vnet/sys/netinet/udp_var.h Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/netinet/udp_var.h Fri Jan 22 15:00:01 2016 (r294566)
@@ -169,10 +169,6 @@ void udplite_ctlinput(int, struct socka
int udp_ctloutput(struct socket *, struct sockopt *);
void udp_init(void);
void udplite_init(void);
-#ifdef VIMAGE
-void udp_destroy(void);
-void udplite_destroy(void);
-#endif
int udp_input(struct mbuf **, int *, int);
void udplite_input(struct mbuf *, int);
struct inpcb *udp_notify(struct inpcb *inp, int errno);
Modified: projects/vnet/sys/netinet6/in6.c
==============================================================================
--- projects/vnet/sys/netinet6/in6.c Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/netinet6/in6.c Fri Jan 22 15:00:01 2016 (r294566)
@@ -1552,7 +1552,7 @@ in6ifa_llaonifp(struct ifnet *ifp)
if (ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED)
return (NULL);
- if_addr_rlock(ifp);
+ IF_ADDR_RLOCK(ifp);
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != AF_INET6)
continue;
@@ -1562,7 +1562,7 @@ in6ifa_llaonifp(struct ifnet *ifp)
IN6_IS_ADDR_MC_NODELOCAL(&sin6->sin6_addr))
break;
}
- if_addr_runlock(ifp);
+ IF_ADDR_RUNLOCK(ifp);
return ((struct in6_ifaddr *)ifa);
}
Modified: projects/vnet/sys/netinet6/in6_ifattach.c
==============================================================================
--- projects/vnet/sys/netinet6/in6_ifattach.c Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/netinet6/in6_ifattach.c Fri Jan 22 15:00:01 2016 (r294566)
@@ -890,3 +890,29 @@ in6_purgemaddrs(struct ifnet *ifp)
IN6_MULTI_UNLOCK();
}
+
+void
+in6_ifattach_destroy(void)
+{
+
+ callout_drain(&V_in6_tmpaddrtimer_ch);
+}
+
+static void
+in6_ifattach_init(void *dummy)
+{
+
+ /* Timer for regeneranation of temporary addresses randomize ID. */
+ callout_init(&V_in6_tmpaddrtimer_ch, 0);
+ callout_reset(&V_in6_tmpaddrtimer_ch,
+ (V_ip6_temp_preferred_lifetime - V_ip6_desync_factor -
+ V_ip6_temp_regen_advance) * hz,
+ in6_tmpaddrtimer, curvnet);
+}
+
+/*
+ * Cheat.
+ * This must be after route_init(), which is now SI_ORDER_THIRD.
+ */
+SYSINIT(in6_ifattach_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_MIDDLE,
+ in6_ifattach_init, NULL);
Modified: projects/vnet/sys/netinet6/in6_ifattach.h
==============================================================================
--- projects/vnet/sys/netinet6/in6_ifattach.h Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/netinet6/in6_ifattach.h Fri Jan 22 15:00:01 2016 (r294566)
@@ -35,6 +35,7 @@
#ifdef _KERNEL
void in6_ifattach(struct ifnet *, struct ifnet *);
+void in6_ifattach_destroy(void);
void in6_ifdetach(struct ifnet *);
int in6_get_tmpifid(struct ifnet *, u_int8_t *, const u_int8_t *, int);
void in6_tmpaddrtimer(void *);
Modified: projects/vnet/sys/netinet6/in6_proto.c
==============================================================================
--- projects/vnet/sys/netinet6/in6_proto.c Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/netinet6/in6_proto.c Fri Jan 22 15:00:01 2016 (r294566)
@@ -152,9 +152,6 @@ struct protosw inet6sw[] = {
.pr_domain = &inet6domain,
.pr_protocol = IPPROTO_IPV6,
.pr_init = ip6_init,
-#ifdef VIMAGE
- .pr_destroy = ip6_destroy,
-#endif
.pr_slowtimo = frag6_slowtimo,
.pr_drain = frag6_drain,
.pr_usrreqs = &nousrreqs,
Modified: projects/vnet/sys/netinet6/ip6_input.c
==============================================================================
--- projects/vnet/sys/netinet6/ip6_input.c Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/netinet6/ip6_input.c Fri Jan 22 15:00:01 2016 (r294566)
@@ -156,9 +156,6 @@ static struct netisr_handler ip6_direct_
};
#endif
-VNET_DECLARE(struct callout, in6_tmpaddrtimer_ch);
-#define V_in6_tmpaddrtimer_ch VNET(in6_tmpaddrtimer_ch)
-
VNET_DEFINE(struct pfil_head, inet6_pfil_hook);
VNET_PCPUSTAT_DEFINE(struct ip6stat, ip6stat);
@@ -170,7 +167,6 @@ VNET_PCPUSTAT_SYSUNINIT(ip6stat);
struct rmlock in6_ifaddr_lock;
RM_SYSINIT(in6_ifaddr_lock, &in6_ifaddr_lock, "in6_ifaddr_lock");
-static void ip6_init2(void *);
static int ip6_hopopts_input(u_int32_t *, u_int32_t *, struct mbuf **, int *);
#ifdef PULLDOWN_TEST
static struct mbuf *ip6_pullexthdr(struct mbuf *, size_t, int);
@@ -331,40 +327,11 @@ ip6_destroy()
}
hashdestroy(V_in6_ifaddrhashtbl, M_IFADDR, V_in6_ifaddrhmask);
nd6_destroy();
- callout_drain(&V_in6_tmpaddrtimer_ch);
+ in6_ifattach_destroy();
}
#endif
static int
-ip6_init2_vnet(const void *unused __unused)
-{
-
- /* nd6_timer_init */
- callout_init(&V_nd6_timer_ch, 0);
- callout_reset(&V_nd6_timer_ch, hz, nd6_timer, curvnet);
-
- /* timer for regeneranation of temporary addresses randomize ID */
- callout_init(&V_in6_tmpaddrtimer_ch, 0);
- callout_reset(&V_in6_tmpaddrtimer_ch,
- (V_ip6_temp_preferred_lifetime - V_ip6_desync_factor -
- V_ip6_temp_regen_advance) * hz,
- in6_tmpaddrtimer, curvnet);
-
- return (0);
-}
-
-static void
-ip6_init2(void *dummy)
-{
-
- ip6_init2_vnet(NULL);
-}
-
-/* cheat */
-/* This must be after route_init(), which is now SI_ORDER_THIRD */
-SYSINIT(netinet6init2, SI_SUB_PROTO_DOMAIN, SI_ORDER_MIDDLE, ip6_init2, NULL);
-
-static int
ip6_input_hbh(struct mbuf *m, uint32_t *plen, uint32_t *rtalert, int *off,
int *nxt, int *ours)
{
Modified: projects/vnet/sys/netinet6/ip6_mroute.c
==============================================================================
--- projects/vnet/sys/netinet6/ip6_mroute.c Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/netinet6/ip6_mroute.c Fri Jan 22 15:00:01 2016 (r294566)
@@ -1966,4 +1966,4 @@ static moduledata_t ip6_mroutemod = {
0
};
-DECLARE_MODULE(ip6_mroute, ip6_mroutemod, SI_SUB_PSEUDO, SI_ORDER_ANY);
+DECLARE_MODULE(ip6_mroute, ip6_mroutemod, SI_SUB_PROTO_MC, SI_ORDER_ANY);
Modified: projects/vnet/sys/netinet6/mld6.c
==============================================================================
--- projects/vnet/sys/netinet6/mld6.c Fri Jan 22 14:52:31 2016 (r294565)
+++ projects/vnet/sys/netinet6/mld6.c Fri Jan 22 15:00:01 2016 (r294566)
@@ -3264,7 +3264,7 @@ mld_init(void *unused __unused)
mld_po.ip6po_prefer_tempaddr = IP6PO_TEMPADDR_NOTPREFER;
mld_po.ip6po_flags = IP6PO_DONTFRAG;
}
-SYSINIT(mld_init, SI_SUB_PSEUDO, SI_ORDER_MIDDLE, mld_init, NULL);
+SYSINIT(mld_init, SI_SUB_PROTO_MC, SI_ORDER_MIDDLE, mld_init, NULL);
static void
mld_uninit(void *unused __unused)
@@ -3273,7 +3273,7 @@ mld_uninit(void *unused __unused)
CTR1(KTR_MLD, "%s: tearing down", __func__);
MLD_LOCK_DESTROY();
}
-SYSUNINIT(mld_uninit, SI_SUB_PSEUDO, SI_ORDER_MIDDLE, mld_uninit, NULL);
+SYSUNINIT(mld_uninit, SI_SUB_PROTO_MC, SI_ORDER_MIDDLE, mld_uninit, NULL);
static void
vnet_mld_init(const void *unused __unused)
@@ -3283,7 +3283,7 @@ vnet_mld_init(const void *unused __unuse
LIST_INIT(&V_mli_head);
}
-VNET_SYSINIT(vnet_mld_init, SI_SUB_PSEUDO, SI_ORDER_ANY, vnet_mld_init,
+VNET_SYSINIT(vnet_mld_init, SI_SUB_PROTO_MC, SI_ORDER_ANY, vnet_mld_init,
NULL);
static void
@@ -3295,7 +3295,7 @@ vnet_mld_uninit(const void *unused __unu
KASSERT(LIST_EMPTY(&V_mli_head),
("%s: mli list not empty; ifnets not detached?", __func__));
}
-VNET_SYSUNINIT(vnet_mld_uninit, SI_SUB_PSEUDO, SI_ORDER_ANY, vnet_mld_uninit,
+VNET_SYSUNINIT(vnet_mld_uninit, SI_SUB_PROTO_MC, SI_ORDER_ANY, vnet_mld_uninit,
NULL);
static int
@@ -3317,4 +3317,4 @@ static moduledata_t mld_mod = {
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list