hv_netvsc: enable multicast if necessary
authorStephen Hemminger <stephen@networkplumber.org>
Tue, 27 Mar 2018 18:28:48 +0000 (11:28 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:52:21 +0000 (07:52 +0200)
[ Upstream commit f03dbb06dc380274e351ca4b1ee1587ed4529e62 ]

My recent change to netvsc drive in how receive flags are handled
broke multicast.  The Hyper-v/Azure virtual interface there is not a
multicast filter list, filtering is only all or none. The driver must
enable all multicast if any multicast address is present.

Fixes: 009f766ca238 ("hv_netvsc: filter multicast/broadcast")
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/hyperv/rndis_filter.c

index 99b55a3f189d0ee538ea6cc427ef23143d8e94d6..d1ae184008b41866d642561c21b5ead9983c449b 100644 (file)
@@ -856,7 +856,7 @@ static void rndis_set_multicast(struct work_struct *w)
        if (flags & IFF_PROMISC) {
                filter = NDIS_PACKET_TYPE_PROMISCUOUS;
        } else {
-               if (flags & IFF_ALLMULTI)
+               if (!netdev_mc_empty(rdev->ndev) || (flags & IFF_ALLMULTI))
                        filter |= NDIS_PACKET_TYPE_ALL_MULTICAST;
                if (flags & IFF_BROADCAST)
                        filter |= NDIS_PACKET_TYPE_BROADCAST;