Commit 009f766c authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

hv_netvsc: filter multicast/broadcast

The netvsc driver was always enabling all multicast and broadcast
even if netdevice flag had not enabled it.
Signed-off-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b3bf5666
...@@ -854,15 +854,19 @@ static void rndis_set_multicast(struct work_struct *w) ...@@ -854,15 +854,19 @@ static void rndis_set_multicast(struct work_struct *w)
{ {
struct rndis_device *rdev struct rndis_device *rdev
= container_of(w, struct rndis_device, mcast_work); = container_of(w, struct rndis_device, mcast_work);
u32 filter = NDIS_PACKET_TYPE_DIRECTED;
unsigned int flags = rdev->ndev->flags;
if (rdev->ndev->flags & IFF_PROMISC) if (flags & IFF_PROMISC) {
rndis_filter_set_packet_filter(rdev, filter = NDIS_PACKET_TYPE_PROMISCUOUS;
NDIS_PACKET_TYPE_PROMISCUOUS); } else {
else if (flags & IFF_ALLMULTI)
rndis_filter_set_packet_filter(rdev, flags |= NDIS_PACKET_TYPE_ALL_MULTICAST;
NDIS_PACKET_TYPE_BROADCAST | if (flags & IFF_BROADCAST)
NDIS_PACKET_TYPE_ALL_MULTICAST | flags |= NDIS_PACKET_TYPE_BROADCAST;
NDIS_PACKET_TYPE_DIRECTED); }
rndis_filter_set_packet_filter(rdev, filter);
} }
void rndis_filter_update(struct netvsc_device *nvdev) void rndis_filter_update(struct netvsc_device *nvdev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment