diff options
author | Matthew Finlay <matt@mellanox.com> | 2016-06-27 11:08:36 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-29 10:28:46 +0200 |
commit | 9ceec359e4ebdbbfd35375203c5bd06d602225f7 (patch) | |
tree | 83b865ed7ed94fc8cebba5cbbf7efb5d82a1933b /drivers | |
parent | net/mlx5e: Check for BlueFlame capability before allocating SQ uar (diff) | |
download | linux-9ceec359e4ebdbbfd35375203c5bd06d602225f7.tar.xz linux-9ceec359e4ebdbbfd35375203c5bd06d602225f7.zip |
net/mlx5e: Prevent adding the same vxlan port
Do not allow the same vxlan udp port to be added to the device more than
once.
Fixes: b3f63c3d5e2c ("net/mlx5e: Add netdev support for VXLAN tunneling")
Signed-off-by: Matthew Finlay <matt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/vxlan.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/vxlan.c b/drivers/net/ethernet/mellanox/mlx5/core/vxlan.c index f2fd1ef16da7..05de77267d58 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/vxlan.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/vxlan.c @@ -105,6 +105,9 @@ static void mlx5e_vxlan_add_port(struct work_struct *work) struct mlx5e_vxlan *vxlan; int err; + if (mlx5e_vxlan_lookup_port(priv, port)) + goto free_work; + if (mlx5e_vxlan_core_add_port_cmd(priv->mdev, port)) goto free_work; |