summaryrefslogtreecommitdiffstats
path: root/sys/net/if_bridge.c
diff options
context:
space:
mode:
authorsyrinx <syrinx@FreeBSD.org>2006-12-04 14:45:02 +0000
committersyrinx <syrinx@FreeBSD.org>2006-12-04 14:45:02 +0000
commitb5c537984bd463a59efd5ae8b00db2da6b4b2a79 (patch)
treeb6129512c425358a54eb42903a4969d60cea72df /sys/net/if_bridge.c
parente472c8dd9a63a668edf18369765bbcf1dce3a47d (diff)
downloadFreeBSD-src-b5c537984bd463a59efd5ae8b00db2da6b4b2a79.zip
FreeBSD-src-b5c537984bd463a59efd5ae8b00db2da6b4b2a79.tar.gz
Add two new flags to if_bridge(4) indicating whether the edge flag
of the bridge port and path cost have been administratively set or calculated automatically by RSTP. Make sure to transition from non-edge to edge when the port goes down and the edge flag was manually set before. This is needed to comply with the condition ((!portEnabled && AdminEdge) || ....) in the Bridge Detection State Machine (IEE802.1D-2004, p. 171). Reviewed by: thompsa Approved by: bz (mentor)
Diffstat (limited to 'sys/net/if_bridge.c')
-rw-r--r--sys/net/if_bridge.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index 7118b2e..28d4561 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -1024,6 +1024,10 @@ bridge_ioctl_gifflags(struct bridge_softc *sc, void *arg)
req->ifbr_ifsflags |= IFBIF_BSTP_P2P;
if (bp->bp_flags & BSTP_PORT_AUTOP2P)
req->ifbr_ifsflags |= IFBIF_BSTP_AUTOP2P;
+ if (bp->bp_flags & BSTP_PORT_ADMEDGE)
+ req->ifbr_ifsflags |= IFBIF_BSTP_ADMEDGE;
+ if (bp->bp_flags & BSTP_PORT_ADMCOST)
+ req->ifbr_ifsflags |= IFBIF_BSTP_ADMCOST;
return (0);
}
OpenPOWER on IntegriCloud