Hi.

I find it somewhat confusing that the bridge goes thru the
down->listen->learning->forwarding states even when STP is turned off.
Attached is a small 2.4.9 patch to make it jump directly to forwarding
when stp is disabled.

I know that it is possible to do close to the same thing by setting all
the timeouts to 0, but doing so mucks up the STP timer settings if one
later wants to enable STP on the bridge.

Regards
Henrik Nordstrom
MARA Systems AB
Sweden
--- linux-2.4.9/net/bridge/br_stp.c.orig        Sat Sep  1 15:19:24 2001
+++ linux-2.4.9/net/bridge/br_stp.c     Sat Sep  1 15:20:08 2001
@@ -369,11 +369,19 @@
 static void br_make_forwarding(struct net_bridge_port *p)
 {
        if (p->state == BR_STATE_BLOCKING) {
+               if (p->br->stp_enabled) {
                printk(KERN_INFO "%s: port %i(%s) entering %s state\n",
                       p->br->dev.name, p->port_no, p->dev->name, "listening");
 
                p->state = BR_STATE_LISTENING;
                br_timer_set(&p->forward_delay_timer, jiffies);
+               } else {
+                       printk(KERN_INFO "%s: port %i(%s) entering %s state\n",
+                              p->br->dev.name, p->port_no, p->dev->name, 
+"forwarding");
+
+                       p->state = BR_STATE_FORWARDING;
+                       br_timer_clear(&p->forward_delay_timer);
+               }
        }
 }
 

Reply via email to