* bif_state is only valid when IFBIF_STP is set, adjust two bits of
code that were using bif_state unconditionally.
* This is a semi-operational change because bif_state's default value
when IFBIF_STP is not set resulted in correct operation anyway.
However, setting STP and then clearing it on a sub-interface could
cause problems with stale state.
/* learning, blocking, bonded, forwarding */
break;
}
+ from_blocking = (bif->bif_state == BSTP_IFSTATE_BLOCKING);
+ } else {
+ from_blocking = 0;
}
- from_blocking = (bif->bif_state == BSTP_IFSTATE_BLOCKING);
eh = mtod(m, struct ether_header *);
m->m_flags |= M_ETHER_BRIDGED;
}
if ((bif->bif_flags & IFBIF_LEARNING) &&
- bif->bif_state != BSTP_IFSTATE_BLOCKING) {
+ ((bif->bif_flags & IFBIF_STP) == 0 ||
+ bif->bif_state != BSTP_IFSTATE_BLOCKING)) {
bridge_rtupdate(sc, eh->ether_shost,
ifp, IFBAF_DYNAMIC);
}