netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Linux Netdev List <netdev@vger.kernel.org>
Cc: Patrick McHardy <kaber@trash.net>
Subject: [PATCH?] Fix call to ->change_rx_flags(dev, IFF_MULTICAST) in dev_change_flags()
Date: Tue, 20 May 2008 13:11:26 +0100	[thread overview]
Message-ID: <1211285486.21380.204.camel@pmac.infradead.org> (raw)

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>

diff --git a/net/core/dev.c b/net/core/dev.c
index a1607bc..2ea3a14 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3130,14 +3130,14 @@ int dev_change_flags(struct net_device *dev, unsigned flags)
 	dev->flags = (flags & (IFF_DEBUG | IFF_NOTRAILERS | IFF_NOARP |
 			       IFF_DYNAMIC | IFF_MULTICAST | IFF_PORTSEL |
 			       IFF_AUTOMEDIA)) |
 		     (dev->flags & (IFF_UP | IFF_VOLATILE | IFF_PROMISC |
 				    IFF_ALLMULTI));
 
 	/*
 	 *	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);


-- 
dwmw2


             reply	other threads:[~2008-05-20 12:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-20 12:11 David Woodhouse [this message]
2008-05-20 12:47 ` [PATCH?] Fix call to ->change_rx_flags(dev, IFF_MULTICAST) in dev_change_flags() Patrick McHardy
2008-05-20 21:36   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1211285486.21380.204.camel@pmac.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).