summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2011-08-01 14:26:13 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-01 14:26:13 -0700
commit6232683b28e9230876628a8cd515adf9b16f576b (patch)
treee658c5563b067cf01a7166eae572a47c97ab3617
parent3bd8b0054a0c800b2c36341d9311f509340bea69 (diff)
downloadstable-queue-6232683b28e9230876628a8cd515adf9b16f576b.tar.gz
2.6.39 patches
-rw-r--r--queue-2.6.39/bridge-send-proper-message_age-in-config-bpdu.patch82
-rw-r--r--queue-2.6.39/series1
2 files changed, 83 insertions, 0 deletions
diff --git a/queue-2.6.39/bridge-send-proper-message_age-in-config-bpdu.patch b/queue-2.6.39/bridge-send-proper-message_age-in-config-bpdu.patch
new file mode 100644
index 0000000000..88d80ecaee
--- /dev/null
+++ b/queue-2.6.39/bridge-send-proper-message_age-in-config-bpdu.patch
@@ -0,0 +1,82 @@
+From 0c03150e7ea8f7fcd03cfef29385e0010b22ee92 Mon Sep 17 00:00:00 2001
+From: stephen hemminger <shemminger@vyatta.com>
+Date: Fri, 22 Jul 2011 07:47:06 +0000
+Subject: bridge: send proper message_age in config BPDU
+
+From: stephen hemminger <shemminger@vyatta.com>
+
+commit 0c03150e7ea8f7fcd03cfef29385e0010b22ee92 upstream.
+
+A bridge topology with three systems:
+
+ +------+ +------+
+ | A(2) |--| B(1) |
+ +------+ +------+
+ \ /
+ +------+
+ | C(3) |
+ +------+
+
+What is supposed to happen:
+ * bridge with the lowest ID is elected root (for example: B)
+ * C detects that A->C is higher cost path and puts in blocking state
+
+What happens. Bridge with lowest id (B) is elected correctly as
+root and things start out fine initially. But then config BPDU
+doesn't get transmitted from A -> C. Because of that
+the link from A-C is transistioned to the forwarding state.
+
+The root cause of this is that the configuration messages
+is generated with bogus message age, and dropped before
+sending.
+
+In the standardmessage_age is supposed to be:
+ the time since the generation of the Configuration BPDU by
+ the Root that instigated the generation of this Configuration BPDU.
+
+Reimplement this by recording the timestamp (age + jiffies) when
+recording config information. The old code incorrectly used the time
+elapsed on the ageing timer which was incorrect.
+
+See also:
+ https://bugzilla.vyatta.com/show_bug.cgi?id=7164
+
+Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ net/bridge/br_private.h | 1 +
+ net/bridge/br_stp.c | 4 ++--
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+--- a/net/bridge/br_private.h
++++ b/net/bridge/br_private.h
+@@ -123,6 +123,7 @@ struct net_bridge_port
+ bridge_id designated_bridge;
+ u32 path_cost;
+ u32 designated_cost;
++ unsigned long designated_age;
+
+ struct timer_list forward_delay_timer;
+ struct timer_list hold_timer;
+--- a/net/bridge/br_stp.c
++++ b/net/bridge/br_stp.c
+@@ -164,8 +164,7 @@ void br_transmit_config(struct net_bridg
+ else {
+ struct net_bridge_port *root
+ = br_get_port(br, br->root_port);
+- bpdu.message_age = br->max_age
+- - (root->message_age_timer.expires - jiffies)
++ bpdu.message_age = (jiffies - root->designated_age)
+ + MESSAGE_AGE_INCR;
+ }
+ bpdu.max_age = br->max_age;
+@@ -189,6 +188,7 @@ static inline void br_record_config_info
+ 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;
+
+ mod_timer(&p->message_age_timer, jiffies
+ + (p->br->max_age - bpdu->message_age));
diff --git a/queue-2.6.39/series b/queue-2.6.39/series
index d20d017774..65f1e3532a 100644
--- a/queue-2.6.39/series
+++ b/queue-2.6.39/series
@@ -66,3 +66,4 @@ revert-dibxxxx-get-rid-of-dma-buffer-on-stack.patch
vfs-fix-race-in-rcu-lookup-of-pruned-dentry.patch
cifs-fix-wsize-negotiation-to-respect-max-buffer-size-and.patch
cifs-lower-default-and-max-wsize-to-what-2.6.39-can-handle.patch
+bridge-send-proper-message_age-in-config-bpdu.patch