Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ceec359 authored by Matthew Finlay's avatar Matthew Finlay Committed by David S. Miller
Browse files

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: b3f63c3d ("net/mlx5e: Add netdev support for VXLAN tunneling")
Signed-off-by: default avatarMatthew Finlay <matt@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fd4782c2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;