Date: Mon, 11 Mar 2019 01:45:26 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344993 - stable/12/sys/net Message-ID: <201903110145.x2B1jQux001850@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903110145.x2B1jQux001850>