Commit 5200959b833ddacf28b6ffce8c331dfd6e0ca797

Authored by Paulius Zaleckas
Committed by David S. Miller
1 parent d9e179ecec

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>

Showing 1 changed file with 1 additions and 2 deletions Side-by-side Diff

net/bridge/br_stp_if.c
... ... @@ -98,14 +98,13 @@
98 98 struct net_bridge *br = p->br;
99 99 int wasroot;
100 100  
101   - br_log_state(p);
102   -
103 101 wasroot = br_is_root_bridge(br);
104 102 br_become_designated_port(p);
105 103 p->state = BR_STATE_DISABLED;
106 104 p->topology_change_ack = 0;
107 105 p->config_pending = 0;
108 106  
  107 + br_log_state(p);
109 108 br_ifinfo_notify(RTM_NEWLINK, p);
110 109  
111 110 del_timer(&p->message_age_timer);