Skip to content

Commit

Permalink
bridge: message age needs to increase, not decrease.
Browse files Browse the repository at this point in the history
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: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
joakim-tjernlund authored and davem330 committed Mar 5, 2012
1 parent aaca735 commit 709e1b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bridge/br_stp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 709e1b5

Please sign in to comment.