[Bridge] [PATCH] stp timer fix, linux version 2.4

Francesco Dolcini fdolcini at sysnetsistemi.it
Tue Oct 9 07:28:50 PDT 2007


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)


Signed-off-by: Francesco Dolcini <fdolcini at sysnetsistemi.it>

--- /a/net/bridge/br_stp.c
+++ /b/net/bridge/br_stp.c
@@ -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)


More information about the Bridge mailing list