mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
bridge: skip forwarding delay if not using STP
If Spanning Tree Protocol is not enabled, there is no good reason for the bridge code to wait for the forwarding delay period before enabling the link. The purpose of the forwarding delay is to allow STP to learn about other bridges before nominating itself. The only possible impact is that when starting up a new port the bridge may flood a packet now, where previously it might have seen traffic from the other host and preseeded the forwarding table. Includes change for local variable br already available in that func. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
60aeba2310
commit
a461c0297f
@ -375,12 +375,12 @@ static void br_make_forwarding(struct net_bridge_port *p)
|
|||||||
if (p->state != BR_STATE_BLOCKING)
|
if (p->state != BR_STATE_BLOCKING)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (br->forward_delay == 0) {
|
if (br->stp_enabled == BR_NO_STP || br->forward_delay == 0) {
|
||||||
p->state = BR_STATE_FORWARDING;
|
p->state = BR_STATE_FORWARDING;
|
||||||
br_topology_change_detection(br);
|
br_topology_change_detection(br);
|
||||||
del_timer(&p->forward_delay_timer);
|
del_timer(&p->forward_delay_timer);
|
||||||
}
|
}
|
||||||
else if (p->br->stp_enabled == BR_KERNEL_STP)
|
else if (br->stp_enabled == BR_KERNEL_STP)
|
||||||
p->state = BR_STATE_LISTENING;
|
p->state = BR_STATE_LISTENING;
|
||||||
else
|
else
|
||||||
p->state = BR_STATE_LEARNING;
|
p->state = BR_STATE_LEARNING;
|
||||||
|
Loading…
Reference in New Issue
Block a user