All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>
Cc: ebiederm@xmission.com, brian.haley@hp.com,
	netdev@vger.kernel.org, maheshkelkar@gmail.com,
	lorenzo@google.com, yoshfuji@linux-ipv6.org, stable@kernel.org
Subject: [RFC] ipv6: don't flush routes when setting loopback down
Date: Thu, 16 Dec 2010 13:28:12 -0800	[thread overview]
Message-ID: <20101216132812.2d7fd885@nehalam> (raw)
In-Reply-To: <20101209.122033.183046393.davem@davemloft.net>

When loopback device is being brought down, then keep the route table
entries because they are special. The entries in the local table for
linklocal routes and ::1 address should not be purged.

This is a sub optimal solution to the problem and should be replaced
by a better fix in future.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

---
patch versus current net-next tree, but if this acceptable
it should be applied to net-2.6 as well.

--- a/net/ipv6/addrconf.c	2010-12-16 10:29:34.035408392 -0800
+++ b/net/ipv6/addrconf.c	2010-12-16 10:30:37.366834482 -0800
@@ -2669,7 +2669,9 @@ static int addrconf_ifdown(struct net_de
 
 	ASSERT_RTNL();
 
-	rt6_ifdown(net, dev);
+	/* Flush routes if device is being removed or it is not loopback */
+	if (how || !(dev->flags & IFF_LOOPBACK))
+		rt6_ifdown(net, dev);
 	neigh_ifdown(&nd_tbl, dev);
 
 	idev = __in6_dev_get(dev);

  parent reply	other threads:[~2010-12-16 21:28 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-06  0:24 echo > 0 .../disable_ipv6 broken in 2.6.37-rc4 Eric W. Biederman
2010-12-06  0:33 ` Lorenzo Colitti
2010-12-06  0:39   ` Eric W. Biederman
2010-12-06  5:51     ` Eric W. Biederman
2010-12-06 16:10 ` Brian Haley
2010-12-08 21:29   ` Eric W. Biederman
2010-12-08 22:49     ` Brian Haley
2010-12-08 23:13       ` Eric W. Biederman
2010-12-08 23:49         ` Stephen Hemminger
2010-12-09  2:42           ` Eric W. Biederman
2010-12-09  3:18             ` Eric W. Biederman
2010-12-09  4:16               ` [PATCH] Fix 2.6.34-rc1 regression in disable_ipv6 support Eric W. Biederman
2010-12-09 15:28                 ` Brian Haley
2010-12-09 16:27                   ` Stephen Hemminger
2010-12-09 19:22                     ` Eric W. Biederman
2010-12-09 19:09                   ` Eric W. Biederman
2010-12-09 19:16                     ` Stephen Hemminger
2010-12-09 19:31                       ` Eric W. Biederman
2010-12-09 20:20                         ` David Miller
2010-12-09 20:20                       ` David Miller
2010-12-09 22:51                         ` Stephen Hemminger
2010-12-16 21:28                         ` Stephen Hemminger [this message]
2010-12-16 23:17                           ` [RFC] ipv6: don't flush routes when setting loopback down Eric W. Biederman
2010-12-17  1:18                           ` Eric W. Biederman
2010-12-17  2:26                             ` David Miller
2011-01-19 19:18                               ` Jiri Bohac
2011-01-19 19:38                                 ` Stephen Hemminger
2011-01-19 19:56                                   ` Jiri Bohac
2011-01-19 20:01                                     ` Stephen Hemminger
2011-01-22  8:17                                       ` Eric W. Biederman
2011-01-22 22:39                                         ` Stephen Hemminger
2011-01-22 22:54                                           ` David Miller
2011-01-23  4:41                                             ` Stephen Hemminger
2011-01-23  5:42                                               ` David Miller
2011-01-23  8:24                                                 ` Stephen Hemminger
2011-01-23  8:26                                                   ` Stephen Hemminger
2011-01-23  9:15                                                     ` [stable] " Willy Tarreau
2011-01-23  9:21                                                       ` Stephen Hemminger
2011-01-23 10:34                                                       ` Stephen Hemminger
2011-01-23 19:21                                                         ` Eric W. Biederman
2011-01-23 19:57                                                           ` [stable] " David Miller
2011-01-23 19:48                                                     ` David Miller
2011-01-23 19:47                                                   ` David Miller
2010-12-10  4:02                   ` [PATCH] Fix 2.6.34-rc1 regression in disable_ipv6 support Stephen Hemminger

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=20101216132812.2d7fd885@nehalam \
    --to=shemminger@vyatta.com \
    --cc=brian.haley@hp.com \
    --cc=davem@davemloft.net \
    --cc=ebiederm@xmission.com \
    --cc=lorenzo@google.com \
    --cc=maheshkelkar@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stable@kernel.org \
    --cc=yoshfuji@linux-ipv6.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.