svn commit: r362271 - head/sys/dev/mlx4/mlx4_en

Hans Petter Selasky hselasky at FreeBSD.org
Wed Jun 17 11:12:10 UTC 2020


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 at 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)


More information about the svn-src-head mailing list