Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 709e1b5c authored by Joakim Tjernlund's avatar Joakim Tjernlund Committed by David S. Miller
Browse files

bridge: message age needs to increase, not decrease.



commit bridge: send proper message_age in config BPDU
added this gem:
  bpdu.message_age = (jiffies - root->designated_age)
  p->designated_age = jiffies + bpdu->message_age;
Notice how bpdu->message_age is negated when reassigned to
bpdu.message_age. This causes message age to decrease breaking the
STP protocol.

Signed-off-by: default avatarJoakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent aaca735f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -186,7 +186,7 @@ static void br_record_config_information(struct net_bridge_port *p,
	p->designated_cost = bpdu->root_path_cost;
	p->designated_bridge = bpdu->bridge_id;
	p->designated_port = bpdu->port_id;
	p->designated_age = jiffies + bpdu->message_age;
	p->designated_age = jiffies - bpdu->message_age;

	mod_timer(&p->message_age_timer, jiffies
		  + (p->br->max_age - bpdu->message_age));