]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_span: Ignore VLAN entries not used by the bridge in mirroring
authorIdo Schimmel <idosch@nvidia.com>
Tue, 22 Feb 2022 17:16:53 +0000 (19:16 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Feb 2022 12:38:16 +0000 (12:38 +0000)
commit6c2d66e0488e23288d74694cbea080ef0a5624e5
tree542b75a852ff7ea1876cbedae79ce80e807bd0b7
parentf0c066828523deaf424467ebd4b2ab4a1a78c9da
mlxsw: spectrum_span: Ignore VLAN entries not used by the bridge in mirroring

Only VLAN entries installed on the bridge device itself should be
considered when checking whether a packet with a specific VLAN can be
mirrored via a bridge device. VLAN entries only used to keep context
(i.e., entries with 'BRIDGE_VLAN_INFO_BRENTRY' unset) should be ignored.

Fix this by preventing mirroring when the VLAN entry does not have the
'BRIDGE_VLAN_INFO_BRENTRY' flag set.

Fixes: 79558fe0b7cd ("mlxsw: spectrum: remove guards against !BRIDGE_VLAN_INFO_BRENTRY")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c