Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jun 2020 11:12:10 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r362271 - head/sys/dev/mlx4/mlx4_en
Message-ID:  <202006171112.05HBCA56004366@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Wed Jun 17 11:12:10 2020
New Revision: 362271
URL: https://svnweb.freebsd.org/changeset/base/362271

Log:
  Allow multicast packets to be received in promiscious mode, in mlx4en(4).
  
  Make sure we disable the multicast filter in promiscious mode aswell as when
  the all multicast flag is set.
  
  MFC after:	1 week
  Found by:	Tycho Nightingale <tychon@freebsd.org>
  Sponsored by:	Mellanox Technologies

Modified:
  head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c

Modified: head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c
==============================================================================
--- head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c	Wed Jun 17 11:05:13 2020	(r362270)
+++ head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c	Wed Jun 17 11:12:10 2020	(r362271)
@@ -850,9 +850,11 @@ static void mlx4_en_do_multicast(struct mlx4_en_priv *
 	int err = 0;
 	u64 mcast_addr = 0;
 
-
-	/* Enable/disable the multicast filter according to IFF_ALLMULTI */
-	if (dev->if_flags & IFF_ALLMULTI) {
+	/*
+	 * Enable/disable the multicast filter according to
+	 * IFF_ALLMULTI and IFF_PROMISC:
+	 */
+	if (dev->if_flags & (IFF_ALLMULTI | IFF_PROMISC)) {
 		err = mlx4_SET_MCAST_FLTR(mdev->dev, priv->port, 0,
 					  0, MLX4_MCAST_DISABLE);
 		if (err)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006171112.05HBCA56004366>