diff options
author | Hans Petter Selasky <hselasky@FreeBSD.org> | 2020-06-17 11:12:10 +0000 |
---|---|---|
committer | Hans Petter Selasky <hselasky@FreeBSD.org> | 2020-06-17 11:12:10 +0000 |
commit | a26df270c96102bc9d9ba43e208207d08026cf7c (patch) | |
tree | a90206d7826a81a04f4c553f2bb6bc01082a1121 | |
parent | aba2397e74a2eff55e2507c27ba31813d6b2a95e (diff) | |
download | src-a26df270c96102bc9d9ba43e208207d08026cf7c.tar.gz src-a26df270c96102bc9d9ba43e208207d08026cf7c.zip |
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
Notes
Notes:
svn path=/head/; revision=362271
-rw-r--r-- | sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c | 8 |
1 files 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) |