diff options
author | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2012-03-01 08:12:19 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-03-04 21:57:40 -0500 |
commit | 709e1b5cd9e1915ad4f6c470ebf6b55d4a911d8c (patch) | |
tree | 2af37cbde55a4b4a0a9872065d28e34ee88aad4d /net/bridge | |
parent | aaca735f4f188641c4786af8f20ed39fcce3809c (diff) |
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: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_stp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c index c9ef3db737d9..6751ed4e0c07 100644 --- a/net/bridge/br_stp.c +++ b/net/bridge/br_stp.c @@ -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)); |