Make if_bridge complain if it can't disable some capabilities.

MFC after:	2 weeks
Sponsored by:	iXsystems, Inc.
This commit is contained in:
Alexander Motin 2017-04-29 08:52:07 +00:00
parent 59150e9141
commit ebe4288151

View File

@ -940,8 +940,12 @@ bridge_set_ifcap(struct bridge_softc *sc, struct bridge_iflist *bif, int set)
error = (*ifp->if_ioctl)(ifp, SIOCSIFCAP, (caddr_t)&ifr);
if (error)
if_printf(sc->sc_ifp,
"error setting interface capabilities on %s\n",
ifp->if_xname);
"error setting capabilities on %s: %d\n",
ifp->if_xname, error);
if ((ifp->if_capenable & ~set) != 0)
if_printf(sc->sc_ifp,
"can't disable some capabilities on %s: 0x%x\n",
ifp->if_xname, ifp->if_capenable & ~set);
}
}