team: set slave to promisc if team is already in promisc mode
authorHangbin Liu <liuhangbin@gmail.com>
Mon, 8 Apr 2019 08:45:17 +0000 (16:45 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 27 Apr 2019 07:36:31 +0000 (09:36 +0200)
commita60a47206a31b92af27ca65b66089b21c5b66d78
treeeebd1a613b9e298069cba0aba8aec9200721ed8b
parent6728c6174a47b8a04ceec89aca9e1195dee7ff6b
team: set slave to promisc if team is already in promisc mode

[ Upstream commit 43c2adb9df7ddd6560fd3546d925b42cef92daa0 ]

After adding a team interface to bridge, the team interface will enter
promisc mode. Then if we add a new slave to team0, the slave will keep
promisc off. Fix it by setting slave to promisc on if team master is
already in promisc mode, also do the same for allmulti.

v2: add promisc and allmulti checking when delete ports

Fixes: 3d249d4ca7d0 ("net: introduce ethernet teaming device")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/team/team.c