Skip to content

Commit

Permalink
net: Fix call to ->change_rx_flags(dev, IFF_MULTICAST) in dev_change_…
Browse files Browse the repository at this point in the history
…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 <dwmw2@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David Woodhouse authored and David S. Miller committed May 20, 2008
1 parent f2df824 commit 0e91796
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0e91796

Please sign in to comment.