Skip to content

Commit 8999ce4

Browse files
hkallweitkuba-moo
authored andcommitted
r8169: respect userspace disabling IFF_MULTICAST
So far we ignore the setting of IFF_MULTICAST. Fix this and clear bit AcceptMulticast if IFF_MULTICAST isn't set. Note: Based on the implementations I've seen it doesn't seem to be 100% clear what a driver is supposed to do if IFF_ALLMULTI is set but IFF_MULTICAST is not. This patch is based on the understanding that IFF_MULTICAST has precedence. Fixes: 1da177e ("Linux-2.6.12-rc2") Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://lore.kernel.org/r/4a57ba02-d52d-4369-9f14-3565e6c1f7dc@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 02d5fdb commit 8999ce4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/ethernet/realtek/r8169_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2582,6 +2582,8 @@ static void rtl_set_rx_mode(struct net_device *dev)
25822582

25832583
if (dev->flags & IFF_PROMISC) {
25842584
rx_mode |= AcceptAllPhys;
2585+
} else if (!(dev->flags & IFF_MULTICAST)) {
2586+
rx_mode &= ~AcceptMulticast;
25852587
} else if (netdev_mc_count(dev) > MC_FILTER_LIMIT ||
25862588
dev->flags & IFF_ALLMULTI ||
25872589
tp->mac_version == RTL_GIGA_MAC_VER_35 ||

0 commit comments

Comments
 (0)