bridge: fix state reporting when port is disabled
authorPaulius Zaleckas <paulius.zaleckas@gmail.com>
Tue, 6 Mar 2012 22:25:22 +0000 (22:25 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Mar 2012 08:25:25 +0000 (00:25 -0800)
Now we have:
eth0: link *down*
br0: port 1(eth0) entered *forwarding* state

br_log_state(p) should be called *after* p->state is set
to BR_STATE_DISABLED.

Reported-by: Zilvinas Valinskas <zilvinas@wilibox.com>
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_stp_if.c

index 19308e305d851a89044434315a86d2e9ca9dc549..f494496373d60c1faf368a05605073a1c71ad04f 100644 (file)
@@ -98,14 +98,13 @@ void br_stp_disable_port(struct net_bridge_port *p)
        struct net_bridge *br = p->br;
        int wasroot;
 
-       br_log_state(p);
-
        wasroot = br_is_root_bridge(br);
        br_become_designated_port(p);
        p->state = BR_STATE_DISABLED;
        p->topology_change_ack = 0;
        p->config_pending = 0;
 
+       br_log_state(p);
        br_ifinfo_notify(RTM_NEWLINK, p);
 
        del_timer(&p->message_age_timer);