From: Kishore A K <kishoreak@gmail.com>

Fixes message_age field update in config BPDUs.  Also checks whether the
BPDU message age has exceeded bridge max age before transmitting config
BPDUs.

Signed-off-by: Kishore A K <KishoreAK@myw.ltindia.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/net/bridge/br_stp.c |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff -puN net/bridge/br_stp.c~bridge-fix-bpdu-message_age net/bridge/br_stp.c
--- 25/net/bridge/br_stp.c~bridge-fix-bpdu-message_age	Wed Jun 23 14:11:40 2004
+++ 25-akpm/net/bridge/br_stp.c	Wed Jun 23 14:11:40 2004
@@ -161,20 +161,19 @@ void br_transmit_config(struct net_bridg
 	if (!br_is_root_bridge(br)) {
 		struct net_bridge_port *root
 			= br_get_port(br, br->root_port);
-		bpdu.max_age = root->message_age_timer.expires - jiffies;
-
-		if (bpdu.max_age <= 0) bpdu.max_age = 1;
+	bpdu.message_age = br->max_age -
+		(root->message_age_timer.expires - jiffies) + 1;
 	}
 	bpdu.max_age = br->max_age;
 	bpdu.hello_time = br->hello_time;
 	bpdu.forward_delay = br->forward_delay;
 
-	br_send_config_bpdu(p, &bpdu);
-
-	p->topology_change_ack = 0;
-	p->config_pending = 0;
-	
-	mod_timer(&p->hold_timer, jiffies + BR_HOLD_TIME);
+	if (bpdu.message_age < br->max_age) {
+		br_send_config_bpdu(p, &bpdu);
+		p->topology_change_ack = 0;
+		p->config_pending = 0;
+		mod_timer(&p->hold_timer, jiffies + BR_HOLD_TIME);
+	}
 }
 
 /* called under bridge lock */
_