netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] hv_netvsc: Correct filter setting for multicast/broadcast
@ 2018-03-09 13:25 Mohammed Gamal
  2018-03-09 18:37 ` Sergei Shtylyov
  0 siblings, 1 reply; 4+ messages in thread
From: Mohammed Gamal @ 2018-03-09 13:25 UTC (permalink / raw)
  To: netdev
  Cc: otubo, sthemmin, linux-kernel, devel, vkuznets, Mohammed Gamal,
	davem

Commit 009f766 intended to filter multicast/broadcast, however
the NDIS filter wasn't set properly in non-promiscuous modes,
which resulted in issues like DHCP timeouts.
This patch sets the filter flags correctly.

Fixes: 009f766 ("hv_netvsc: filter multicast/broadcast")

Signed-off-by: Mohammed Gamal <mgamal@redhat.com>
---
 drivers/net/hyperv/rndis_filter.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c
index 8927c48..411a3ae 100644
--- a/drivers/net/hyperv/rndis_filter.c
+++ b/drivers/net/hyperv/rndis_filter.c
@@ -861,9 +861,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);
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-03-09 18:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1520594542-24257-1-git-send-email-mgamal@redhat.com>
2018-03-09 15:16 ` [PATCH net-next] hv_netvsc: Correct filter setting for multicast/broadcast David Miller
2018-03-09 13:25 Mohammed Gamal
2018-03-09 18:37 ` Sergei Shtylyov
2018-03-09 18:38   ` Sergei Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).