diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -137,6 +137,7 @@ static int lagg_port_checkstacking(struct lagg_softc *); #endif static void lagg_port2req(struct lagg_port *, struct lagg_reqport *); +static void lagg_if_updown(struct lagg_softc *, bool); static void lagg_init(void *); static void lagg_stop(struct lagg_softc *); static int lagg_ioctl(struct ifnet *, u_long, caddr_t); @@ -1265,6 +1266,25 @@ callout_reset(&sc->sc_watchdog, hz, &lagg_watchdog_infiniband, arg); } +static void +lagg_if_updown(struct lagg_softc *sc, bool up) +{ + struct ifreq ifr = {}; + struct lagg_port *lp; + + LAGG_XLOCK_ASSERT(sc); + + CK_SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { + if (up) + if_up(lp->lp_ifp); + else + if_down(lp->lp_ifp); + + if (lp->lp_ioctl != NULL) + lp->lp_ioctl(lp->lp_ifp, SIOCSIFFLAGS, (caddr_t)&ifr); + } +} + static void lagg_init(void *xsc) { @@ -1291,6 +1311,8 @@ if_setlladdr(lp->lp_ifp, IF_LLADDR(ifp), ifp->if_addrlen); } + lagg_if_updown(sc, true); + lagg_proto_init(sc); if (ifp->if_type == IFT_INFINIBAND) { @@ -1320,6 +1342,8 @@ callout_stop(&sc->sc_watchdog); mtx_unlock(&sc->sc_mtx); + lagg_if_updown(sc, false); + callout_drain(&sc->sc_watchdog); } diff --git a/tests/sys/net/if_lagg_test.sh b/tests/sys/net/if_lagg_test.sh --- a/tests/sys/net/if_lagg_test.sh +++ b/tests/sys/net/if_lagg_test.sh @@ -358,7 +358,6 @@ { local TAP0 TAP1 LAGG MAC - atf_expect_fail "PR 226144 Upping a lagg interrface should automatically up its children" # Configure the lagg interface to use an RFC5737 nonrouteable addresses ADDR="192.0.2.2" MASK="24"