MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bridge_mutecaps

Function bridge_mutecaps

freebsd/net/if_bridge.c:937–961  ·  view source on GitHub ↗

* bridge_mutecaps: * * Clear or restore unwanted capabilities on the member interface */

Source from the content-addressed store, hash-verified

935 * Clear or restore unwanted capabilities on the member interface
936 */
937static void
938bridge_mutecaps(struct bridge_softc *sc)
939{
940 struct bridge_iflist *bif;
941 int enabled, mask;
942
943 BRIDGE_LOCK_ASSERT(sc);
944
945 /* Initial bitmask of capabilities to test */
946 mask = BRIDGE_IFCAPS_MASK;
947
948 CK_LIST_FOREACH(bif, &sc->sc_iflist, bif_next) {
949 /* Every member must support it or its disabled */
950 mask &= bif->bif_savedcaps;
951 }
952
953 CK_LIST_FOREACH(bif, &sc->sc_iflist, bif_next) {
954 enabled = bif->bif_ifp->if_capenable;
955 enabled &= ~BRIDGE_IFCAPS_STRIP;
956 /* strip off mask bits and enable them again if allowed */
957 enabled &= ~BRIDGE_IFCAPS_MASK;
958 enabled |= mask;
959 bridge_set_ifcap(sc, bif, enabled);
960 }
961}
962
963static void
964bridge_set_ifcap(struct bridge_softc *sc, struct bridge_iflist *bif, int set)

Callers 2

bridge_delete_memberFunction · 0.85
bridge_ioctl_addFunction · 0.85

Calls 1

bridge_set_ifcapFunction · 0.85

Tested by

no test coverage detected