]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: Fix call to ->change_rx_flags(dev, IFF_MULTICAST) in dev_change_flags()
authorDavid Woodhouse <dwmw2@infradead.org>
Tue, 20 May 2008 21:36:14 +0000 (14:36 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 16 Jun 2008 20:19:55 +0000 (13:19 -0700)
[ upstream commit: 0e91796eb46e29edc791131c832a2232bcaed9dd ]

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 <dwmw2@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
net/core/dev.c

index 460e7f99ce3e3c2e3d252dd31ff251ce49841d0a..37ffd7a378cbff4346b24ee31945738e6251d3a1 100644 (file)
@@ -3132,7 +3132,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);