]> git.neil.brown.name Git - history.git/commitdiff
[BRIDGE]: Skip the LISTENING_STP state if STP is disabled.
authorLennert Buytenhek <buytenh@gnu.org>
Fri, 4 Oct 2002 12:21:14 +0000 (05:21 -0700)
committerDavid S. Miller <davem@nuts.ninka.net>
Fri, 4 Oct 2002 12:21:14 +0000 (05:21 -0700)
net/bridge/br_stp.c

index 8625038e15580fa131fb76e665126f4d4b6b412d..1fde8eb0156f3f1aab682fa4e67b5e1e3b6a2791 100644 (file)
@@ -369,10 +369,19 @@ static void br_make_blocking(struct net_bridge_port *p)
 static void br_make_forwarding(struct net_bridge_port *p)
 {
        if (p->state == BR_STATE_BLOCKING) {
-               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;
+               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;
+               } else {
+                       printk(KERN_INFO "%s: port %i(%s) entering %s state\n",
+                              p->br->dev.name, p->port_no, p->dev->name,
+                              "learning");
+
+                       p->state = BR_STATE_LEARNING;
+               }
                br_timer_set(&p->forward_delay_timer, jiffies);
        }
 }