linux-brain/net/dsa
Rundong Ge 072e11e73d net: dsa: slave: Don't propagate flag changes on down slave interfaces
[ Upstream commit 17ab4f61b8 ]

The unbalance of master's promiscuity or allmulti will happen after ifdown
and ifup a slave interface which is in a bridge.

When we ifdown a slave interface , both the 'dsa_slave_close' and
'dsa_slave_change_rx_flags' will clear the master's flags. The flags
of master will be decrease twice.
In the other hand, if we ifup the slave interface again, since the
slave's flags were cleared the 'dsa_slave_open' won't set the master's
flag, only 'dsa_slave_change_rx_flags' that triggered by 'br_add_if'
will set the master's flags. The flags of master is increase once.

Only propagating flag changes when a slave interface is up makes
sure this does not happen. The 'vlan_dev_change_rx_flags' had the
same problem and was fixed, and changes here follows that fix.

Fixes: 91da11f870 ("net: Distributed Switch Architecture protocol support")
Signed-off-by: Rundong Ge <rdong.ge@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-12 19:45:00 +01:00
..
dsa_priv.h net-next: dsa: add Qualcomm tag RX/TX handler 2016-09-16 04:31:51 -04:00
dsa.c of_mdio: add helper to deregister fixed-link PHYs 2016-11-29 23:17:02 -05:00
dsa2.c net: dsa: Do not destroy invalid network devices 2017-02-18 15:11:43 +01:00
Kconfig net: dsa: select NET_SWITCHDEV 2017-11-15 15:53:17 +01:00
Makefile net-next: dsa: add Qualcomm tag RX/TX handler 2016-09-16 04:31:51 -04:00
slave.c net: dsa: slave: Don't propagate flag changes on down slave interfaces 2019-02-12 19:45:00 +01:00
tag_brcm.c net: dsa: Add a ports structure and use it in the switch structure 2016-06-04 14:29:53 -07:00
tag_dsa.c net: dsa: Add a ports structure and use it in the switch structure 2016-06-04 14:29:53 -07:00
tag_edsa.c net: dsa: Add a ports structure and use it in the switch structure 2016-06-04 14:29:53 -07:00
tag_qca.c net-next: dsa: add Qualcomm tag RX/TX handler 2016-09-16 04:31:51 -04:00
tag_trailer.c net: dsa: Add a ports structure and use it in the switch structure 2016-06-04 14:29:53 -07:00