Commit 6a5166e0 authored by Vladimir Oltean's avatar Vladimir Oltean Committed by David S. Miller

net: dsa: sja1105: fix ucast/bcast flooding always remaining enabled

In the blamed patch I managed to introduce a bug while moving code
around: the same logic is applied to the ucast_egress_floods and
bcast_egress_floods variables both on the "if" and the "else" branches.

This is clearly an unintended change compared to how the code used to be
prior to that bugfix, so restore it.

Fixes: 7f7ccdea ("net: dsa: sja1105: fix leakage of flooded frames outside bridging domain")
Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 053d8ad1
...@@ -3369,14 +3369,14 @@ static int sja1105_port_ucast_bcast_flood(struct sja1105_private *priv, int to, ...@@ -3369,14 +3369,14 @@ static int sja1105_port_ucast_bcast_flood(struct sja1105_private *priv, int to,
if (flags.val & BR_FLOOD) if (flags.val & BR_FLOOD)
priv->ucast_egress_floods |= BIT(to); priv->ucast_egress_floods |= BIT(to);
else else
priv->ucast_egress_floods |= BIT(to); priv->ucast_egress_floods &= ~BIT(to);
} }
if (flags.mask & BR_BCAST_FLOOD) { if (flags.mask & BR_BCAST_FLOOD) {
if (flags.val & BR_BCAST_FLOOD) if (flags.val & BR_BCAST_FLOOD)
priv->bcast_egress_floods |= BIT(to); priv->bcast_egress_floods |= BIT(to);
else else
priv->bcast_egress_floods |= BIT(to); priv->bcast_egress_floods &= ~BIT(to);
} }
return sja1105_manage_flood_domains(priv); return sja1105_manage_flood_domains(priv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment