Permalink
Browse files

MFC: 258276

Fix creating a vlan over lagg over mlxen crash.

PR:             181931
Submitted by:   Shahar Klein (shahark mellanox.com)

Approved by:	re
  • Loading branch information...
1 parent 6863a0e commit a5f87707e1eaffc8f4b4830216b749365c9e80f2 @splbio splbio committed Nov 17, 2013
Showing with 6 additions and 0 deletions.
  1. +6 −0 sys/ofed/drivers/net/mlx4/en_netdev.c
@@ -52,6 +52,9 @@ static void mlx4_en_vlan_rx_add_vid(void *arg, struct net_device *dev, u16 vid)
int idx;
u8 field;
+ if (arg != priv)
+ return;
+
if ((vid == 0) || (vid > 4095)) /* Invalid */
return;
en_dbg(HW, priv, "adding VLAN:%d\n", vid);
@@ -73,6 +76,9 @@ static void mlx4_en_vlan_rx_kill_vid(void *arg, struct net_device *dev, u16 vid)
int idx;
u8 field;
+ if (arg != priv)
+ return;
+
if ((vid == 0) || (vid > 4095)) /* Invalid */
return;
en_dbg(HW, priv, "Killing VID:%d\n", vid);

0 comments on commit a5f8770

Please sign in to comment.