If the port is agreed or edge then allow it go go straight to forwarding rather

than waiting another tick (1s) for the states to be checked again.
This commit is contained in:
Andrew Thompson 2006-11-02 00:39:36 +00:00
parent 3398f41fc0
commit edc9f4ae99
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=163895

View File

@ -1045,16 +1045,17 @@ bstp_update_roles(struct bstp_state *bs, struct bstp_port *bp)
bp->bp_operedge) &&
(bp->bp_recent_root_timer.active == 0 || !bp->bp_reroot) &&
!bp->bp_sync) {
switch (bp->bp_state) {
case BSTP_IFSTATE_DISCARDING:
bstp_set_port_state(bp, BSTP_IFSTATE_LEARNING);
break;
case BSTP_IFSTATE_LEARNING:
/*
* If agreed|operedge then go straight to forwarding,
* otherwise follow discard -> learn -> forward.
*/
if (bp->bp_agreed || bp->bp_operedge ||
bp->bp_state == BSTP_IFSTATE_LEARNING) {
bstp_set_port_state(bp,
BSTP_IFSTATE_FORWARDING);
bp->bp_agreed = bp->bp_protover;
break;
}
} else if (bp->bp_state == BSTP_IFSTATE_DISCARDING)
bstp_set_port_state(bp, BSTP_IFSTATE_LEARNING);
}
if (((bp->bp_sync && !bp->bp_synced) ||