Index: head/sys/net/if_lagg.c =================================================================== --- head/sys/net/if_lagg.c +++ head/sys/net/if_lagg.c @@ -679,6 +679,9 @@ return (EINVAL); } + if (sc->sc_destroying == 1) + return (ENXIO); + /* Limit the maximal number of lagg ports */ if (sc->sc_count >= LAGG_MAX_PORTS) return (ENOSPC); @@ -1190,6 +1193,8 @@ int count, buflen, len, error = 0, oldmtu; bzero(&rpbuf, sizeof(rpbuf)); + + /* XXX: This can race with lagg_clone_destroy. */ switch (cmd) { case SIOCGLAGG: