Date: Fri, 26 Apr 2019 21:21:55 +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-11@freebsd.org Subject: svn commit: r346767 - stable/11/sys/net Message-ID: <201904262121.x3QLLtgV044452@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Fri Apr 26 21:21:55 2019 New Revision: 346767 URL: https://svnweb.freebsd.org/changeset/base/346767 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/11/sys/net/if_bridge.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/if_bridge.c ============================================================================== --- stable/11/sys/net/if_bridge.c Fri Apr 26 21:19:06 2019 (r346766) +++ stable/11/sys/net/if_bridge.c Fri Apr 26 21:21:55 2019 (r346767) @@ -931,7 +931,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); @@ -944,10 +944,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?201904262121.x3QLLtgV044452>