svn commit: r344993 - stable/12/sys/net
Alexander Motin
mav at FreeBSD.org
Mon Mar 11 01:45:27 UTC 2019
Author: mav
Date: Mon Mar 11 01:45:26 2019
New Revision: 344993
URL: https://svnweb.freebsd.org/changeset/base/344993
Log:
MFC r344782: bridge: Fix spurious warnings about capabilities
Mask off the bits we don't care about when checking that capabilities
of the member interfaces have been disabled as intended.
Modified:
stable/12/sys/net/if_bridge.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/net/if_bridge.c
==============================================================================
--- stable/12/sys/net/if_bridge.c Mon Mar 11 01:44:37 2019 (r344992)
+++ stable/12/sys/net/if_bridge.c Mon Mar 11 01:45:26 2019 (r344993)
@@ -925,7 +925,7 @@ bridge_set_ifcap(struct bridge_softc *sc, struct bridg
{
struct ifnet *ifp = bif->bif_ifp;
struct ifreq ifr;
- int error;
+ int error, mask, stuck;
BRIDGE_UNLOCK_ASSERT(sc);
@@ -938,10 +938,12 @@ bridge_set_ifcap(struct bridge_softc *sc, struct bridg
if_printf(sc->sc_ifp,
"error setting capabilities on %s: %d\n",
ifp->if_xname, error);
- if ((ifp->if_capenable & ~set) != 0)
+ mask = BRIDGE_IFCAPS_MASK | BRIDGE_IFCAPS_STRIP;
+ stuck = ifp->if_capenable & mask & ~set;
+ if (stuck != 0)
if_printf(sc->sc_ifp,
"can't disable some capabilities on %s: 0x%x\n",
- ifp->if_xname, ifp->if_capenable & ~set);
+ ifp->if_xname, stuck);
}
}
More information about the svn-src-stable
mailing list