Ethernet Bridge development
 help / color / mirror / Atom feed
* [Bridge] [PATCH] stp timer fix, linux version 2.4
@ 2007-10-09 12:57 Francesco Dolcini
  2007-10-10 14:47 ` Francesco Dolcini
  0 siblings, 1 reply; 3+ messages in thread
From: Francesco Dolcini @ 2007-10-09 12:57 UTC (permalink / raw)
  To: bridge

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.

Signed-off-by: Francesco Dolcini <fdolcini@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)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bridge] [PATCH] stp timer fix, linux version 2.4
@ 2007-10-09 14:28 Francesco Dolcini
  0 siblings, 0 replies; 3+ messages in thread
From: Francesco Dolcini @ 2007-10-09 14:28 UTC (permalink / raw)
  To: bridge

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@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)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Bridge] [PATCH] stp timer fix, linux version 2.4
  2007-10-09 12:57 Francesco Dolcini
@ 2007-10-10 14:47 ` Francesco Dolcini
  0 siblings, 0 replies; 3+ messages in thread
From: Francesco Dolcini @ 2007-10-10 14:47 UTC (permalink / raw)
  To: Francesco Dolcini; +Cc: bridge

Francesco Dolcini wrote:
> 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, just broken.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-10-10 14:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-09 14:28 [Bridge] [PATCH] stp timer fix, linux version 2.4 Francesco Dolcini
  -- strict thread matches above, loose matches on Subject: below --
2007-10-09 12:57 Francesco Dolcini
2007-10-10 14:47 ` Francesco Dolcini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox