netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch net-next] ipv6: exit early in addrconf_notify() if IPv6 is disabled
@ 2014-09-11 22:07 Cong Wang
  2014-09-12 20:18 ` Hannes Frederic Sowa
  2014-09-13 20:39 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Cong Wang @ 2014-09-11 22:07 UTC (permalink / raw)
  To: netdev; +Cc: Hideaki YOSHIFUJI, David S. Miller, Cong Wang

If IPv6 is explicitly disabled before the interface comes up,
it makes no sense to continue when it comes up, even just
print a message.

(I am not sure about other cases though, so I prefer not to touch)

Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>

---
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index ad4598f..12a2efe 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2844,6 +2844,9 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
 		if (dev->flags & IFF_SLAVE)
 			break;
 
+		if (idev && idev->cnf.disable_ipv6)
+			break;
+
 		if (event == NETDEV_UP) {
 			if (!addrconf_qdisc_ok(dev)) {
 				/* device is not ready yet. */

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-13 20:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-11 22:07 [Patch net-next] ipv6: exit early in addrconf_notify() if IPv6 is disabled Cong Wang
2014-09-12 20:18 ` Hannes Frederic Sowa
2014-09-13  0:10   ` Cong Wang
2014-09-13 20:39 ` David Miller

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).