Skip to contentSkip to conversation

stp timer fix, linux version 2.4

PATCH New Francesco Dolcini 1 participant 1 message Oct 9, 2007 Ethernet bridge

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 stp timer fix, linux version 2.4

In kernel 2.4, br_record_config_information update message_age_timer with jiffies in the past. In 2.6 is already fixed and a similar fix appeared in v2.4.35.3.

sorry if you receive this twice, I had problem sending to the list (I think my previous mail got filtered)

b/net/bridge/br_stp.c renamed from a/net/bridge/br_stp.c +3 -1
@@ -186,9 +186,11 @@
 	p->designated_cost = bpdu->root_path_cost;
 	p->designated_bridge = bpdu->bridge_id;
 	p->designated_port = bpdu->port_id;
 
-	br_timer_set(&p->message_age_timer, jiffies - bpdu->message_age);
+	br_timer_set(&p->message_age_timer, jiffies +
+		     (p->br->max_age - bpdu->message_age));
+
 }
 
 /* called under bridge lock */
 static void br_record_config_timeout_values(struct net_bridge *br, struct br_config_bpdu *bpdu)