From a26df270c96102bc9d9ba43e208207d08026cf7c Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Wed, 17 Jun 2020 11:12:10 +0000 Subject: [PATCH] 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 Sponsored by: Mellanox Technologies --- sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c b/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c index 43cd215cd4f6..b36afc66d476 100644 --- a/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c +++ b/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c @@ -850,9 +850,11 @@ static void mlx4_en_do_multicast(struct mlx4_en_priv *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)