diff options
author | Eli Cohen <eli@mellanox.com> | 2020-03-12 17:20:32 +0200 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2020-03-17 19:41:41 -0700 |
commit | 87b51810f4ad99a833883f6f00795ee550f3a622 (patch) | |
tree | 906097392d7faef0931be941bd4760d71a58b1df /drivers | |
parent | 613f53fe09a27f928a7d05132e1a74b5136e8f04 (diff) | |
download | linux-stable-87b51810f4ad99a833883f6f00795ee550f3a622.tar.gz linux-stable-87b51810f4ad99a833883f6f00795ee550f3a622.tar.bz2 linux-stable-87b51810f4ad99a833883f6f00795ee550f3a622.zip |
net/mlx5: Avoid forwarding to other eswitch uplink
Do not allow forwarding of encapsulated traffic received from one eswtich's
uplink to another eswtich's uplink.
Signed-off-by: Eli Cohen <eli@mellanox.com>
Reviewed-by: Oz Shlomo <ozsh@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c index 608d0e07c308..b45c3f46570b 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c @@ -66,6 +66,9 @@ static int get_route_and_out_devs(struct mlx5e_priv *priv, mlx5e_is_uplink_rep(netdev_priv(*out_dev)))) return -EOPNOTSUPP; + if (mlx5e_eswitch_uplink_rep(priv->netdev) && *out_dev != priv->netdev) + return -EOPNOTSUPP; + return 0; } |