Skip to contentSkip to conversation

bridge: skip forwarding delay if not using STP

PATCH Applied Stephen Hemminger 2 participants 2 messages Mar 10, 2011 – Mar 14, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bridge: skip forwarding delay if not using STP

f 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.

net/bridge/br_stp.c +2 -2
@@ -375,12 +375,12 @@ static void br_make_forwarding(struct ne
 	if (p->state != BR_STATE_BLOCKING)
 		return;
 
-	if (br->forward_delay == 0) {
+	if (br->stp_enabled == BR_NO_STP || br->forward_delay == 0) {
 		p->state = BR_STATE_FORWARDING;
 		br_topology_change_detection(br);
 		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;
 	else
 		p->state = BR_STATE_LEARNING;
maintainer Applied
#1 lore raw

From: Stephen Hemminger <[email protected]>
Date: Thu, 10 Mar 2011 07:57:04 -0800

Quoted 5 lines

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.

Quoted 7 lines

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.

Applied to net-2.6, thanks.