From: David Woodhouse Date: Tue, 20 May 2008 21:36:14 +0000 (-0700) Subject: net: Fix call to ->change_rx_flags(dev, IFF_MULTICAST) in dev_change_flags() X-Git-Tag: v2.6.26-rc4~91^2~4 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=0e91796eb46e29edc791131c832a2232bcaed9dd;p=linux-2.6-omap-h63xx.git net: Fix call to ->change_rx_flags(dev, IFF_MULTICAST) in dev_change_flags() Am I just being particularly dim today, or can the call to dev->change_rx_flags(dev, IFF_MULTICAST) in dev_change_flags() never happen? We've just set dev->flags = flags & IFF_MULTICAST, effectively. So the condition '(dev->flags ^ flags) & IFF_MULTICAST' is _never_ going to be true. Signed-off-by: David Woodhouse Signed-off-by: David S. Miller --- diff --git a/net/core/dev.c b/net/core/dev.c index ce88c0d3e35..58296307787 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3141,7 +3141,7 @@ int dev_change_flags(struct net_device *dev, unsigned flags) * Load in the correct multicast list now the flags have changed. */ - if (dev->change_rx_flags && (dev->flags ^ flags) & IFF_MULTICAST) + if (dev->change_rx_flags && (old_flags ^ flags) & IFF_MULTICAST) dev->change_rx_flags(dev, IFF_MULTICAST); dev_set_rx_mode(dev);