diff options
author | Paulius Zaleckas <paulius.zaleckas@gmail.com> | 2012-03-06 17:25:22 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-03-08 03:25:25 -0500 |
commit | 5200959b833ddacf28b6ffce8c331dfd6e0ca797 (patch) | |
tree | a2a85508fb35f524e800b8451ddad8f3682948b1 /net/bridge/br_stp_if.c | |
parent | d9e179ecec0805c41b17f9a0c3b925d415677772 (diff) |
bridge: fix state reporting when port is disabled
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>
Diffstat (limited to 'net/bridge/br_stp_if.c')
-rw-r--r-- | net/bridge/br_stp_if.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c index 19308e305d85..f494496373d6 100644 --- a/net/bridge/br_stp_if.c +++ b/net/bridge/br_stp_if.c | |||
@@ -98,14 +98,13 @@ void br_stp_disable_port(struct net_bridge_port *p) | |||
98 | struct net_bridge *br = p->br; | 98 | struct net_bridge *br = p->br; |
99 | int wasroot; | 99 | int wasroot; |
100 | 100 | ||
101 | br_log_state(p); | ||
102 | |||
103 | wasroot = br_is_root_bridge(br); | 101 | wasroot = br_is_root_bridge(br); |
104 | br_become_designated_port(p); | 102 | br_become_designated_port(p); |
105 | p->state = BR_STATE_DISABLED; | 103 | p->state = BR_STATE_DISABLED; |
106 | p->topology_change_ack = 0; | 104 | p->topology_change_ack = 0; |
107 | p->config_pending = 0; | 105 | p->config_pending = 0; |
108 | 106 | ||
107 | br_log_state(p); | ||
109 | br_ifinfo_notify(RTM_NEWLINK, p); | 108 | br_ifinfo_notify(RTM_NEWLINK, p); |
110 | 109 | ||
111 | del_timer(&p->message_age_timer); | 110 | del_timer(&p->message_age_timer); |