提交 6a5166e0 编写于 作者: V Vladimir Oltean 提交者: 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: NVladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册