VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   30 Branches   50 Tags
author: Vladimir Oltean <vladimir.oltean@nxp.com> 2023-06-30 19:41:18 +0300 committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2023-07-19 16:36:46 +0200 commit: f8fe2df13a0fe3e4044cf148615031a77d4f7c35 parent: b018ce10361b8b24d7e6ec1d530cb4ce29732fe4
Commit Summary:
net: bridge: keep ports without IFF_UNICAST_FLT in BR_PROMISC mode
Diffstat:
1 file changed, 3 insertions, 2 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index 3f04b40f6056..2450690f98cf 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -166,8 +166,9 @@ void br_manage_promisc(struct net_bridge *br)
 			 * This lets us disable promiscuous mode and write
 			 * this config to hw.
 			 */
-			if (br->auto_cnt == 0 ||
-			    (br->auto_cnt == 1 && br_auto_port(p)))
+			if ((p->dev->priv_flags & IFF_UNICAST_FLT) &&
+			    (br->auto_cnt == 0 ||
+			     (br->auto_cnt == 1 && br_auto_port(p))))
 				br_port_clear_promisc(p);
 			else
 				br_port_set_promisc(p);