svn commit: r362570 - stable/12/sys/dev/mlx4/mlx4_en

Hans Petter Selasky hselasky at FreeBSD.org
Wed Jun 24 05:10:41 UTC 2020


Author: hselasky
Date: Wed Jun 24 05:10:41 2020
New Revision: 362570
URL: https://svnweb.freebsd.org/changeset/base/362570

Log:
  MFC r362271:
  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.
  
  Found by:	Tycho Nightingale <tychon at freebsd.org>
  Sponsored by:	Mellanox Technologies

Modified:
  stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c
==============================================================================
--- stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c	Wed Jun 24 02:08:08 2020	(r362569)
+++ stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c	Wed Jun 24 05:10:41 2020	(r362570)
@@ -852,9 +852,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)


More information about the svn-src-all mailing list