[azure-edge:x,1/2] hv_netvsc: fix filter flags
diff mbox series

Message ID 1522344209-8022-2-git-send-email-marcelo.cerri@canonical.com
State New
Headers show
Series
  • [azure-edge:x,1/2] hv_netvsc: fix filter flags
Related show

Commit Message

Marcelo Henrique Cerri March 29, 2018, 5:23 p.m. UTC
From: Stephen Hemminger <stephen@networkplumber.org>

BugLink: http://bugs.launchpad.net/bugs/1759885

The recent change to not always enable all multicast and broadcast
was broken; meant to set filter, not change flags.

Fixes: 009f766ca238 ("hv_netvsc: filter multicast/broadcast")
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit de3d50aadd40bf68614db9fd157b275ce9c2d467)
Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
---
 drivers/net/hyperv/rndis_filter.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c
index 6b7f342ccdd1..c4bf28d5ba92 100644
--- a/drivers/net/hyperv/rndis_filter.c
+++ b/drivers/net/hyperv/rndis_filter.c
@@ -862,9 +862,9 @@  static void rndis_set_multicast(struct work_struct *w)
 		filter = NDIS_PACKET_TYPE_PROMISCUOUS;
 	} else {
 		if (flags & IFF_ALLMULTI)
-			flags |= NDIS_PACKET_TYPE_ALL_MULTICAST;
+			filter |= NDIS_PACKET_TYPE_ALL_MULTICAST;
 		if (flags & IFF_BROADCAST)
-			flags |= NDIS_PACKET_TYPE_BROADCAST;
+			filter |= NDIS_PACKET_TYPE_BROADCAST;
 	}
 
 	rndis_filter_set_packet_filter(rdev, filter);