From: Stephen Hemminger <shemminger@vyatta.com>
To: Jiri Bohac <jbohac@suse.cz>
Cc: David Miller <davem@davemloft.net>,
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: Re: [RFC] ipv6: don't flush routes when setting loopback down
Date: Wed, 19 Jan 2011 11:38:17 -0800 [thread overview]
Message-ID: <20110119113817.0819ddf1@s6510> (raw)
In-Reply-To: <20110119191823.GC8442@midget.suse.cz>
On Wed, 19 Jan 2011 20:18:23 +0100
Jiri Bohac <jbohac@suse.cz> wrote:
> Hi,
>
>
> The commit (29ba5fed1bbd09c2cba890798c8f9eaab251401d) causes
> another regression:
>
> Prior to the commit, on a freshly booted system, when I do:
> sysctl net.ipv6.conf.all.disable_ipv6=1
> Then any attempt to connect to ::1 will fail immediately with
> "Network is unreachable" (e.g. "ping6 ::1" or "telnet ::1 22".
>
> After the commit, doing
> sysctl net.ipv6.conf.all.disable_ipv6=1
> makes connection attempts to ::1 wait for a long time before they fail.
>
> This is caused by the local route which is now left configured.
> "ip -6 r l table all" has an additional line in its output:
> local ::1 via :: dev lo table local proto none metric 0 mtu 16436 rtt 40ms rttvar 40ms cwnd 3 advmss 16376 hoplimit 0
>
> With both ::1 and 127.0.0.1 specified for localhost in
> /etc/hosts, disabling ipv6 now breaks many applications
> connecting to localhost. Deleting the local route manually solves
> the problems.
>
> Could this be reverted, please?
>
> I have the feeling that Eric's patch is the safest solution we
> have so far:
>
> > Finding the real bug is beyond me right now, but fixing the regression
> > in disable_ipv6 is simple. We can just delete ::1 when we bring down
> > the loopback interface, and it will be restored automatically when we
> > bring the loopback interface back up.
> >
> > Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
> > ---
> > Index: linux-2.6.37-rc5.x86_64/net/ipv6/addrconf.c
> > ===================================================================
> > --- linux-2.6.37-rc5.x86_64.orig/net/ipv6/addrconf.c
> > +++ linux-2.6.37-rc5.x86_64/net/ipv6/addrconf.c
> > @@ -2727,6 +2727,7 @@ static int addrconf_ifdown(struct net_de
> > /* If just doing link down, and address is permanent
> > and not link-local, then retain it. */
> > if (!how &&
> > + !ipv6_addr_loopback(&ifa->addr) &&
> > (ifa->flags&IFA_F_PERMANENT) &&
> > !(ipv6_addr_type(&ifa->addr) & IPV6_ADDR_LINKLOCAL)) {
> > list_move_tail(&ifa->if_list, &keep_list);
>
Eric's patch has other regressions, see the discussion.
next prev parent reply other threads:[~2011-01-19 19:38 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 ` [RFC] ipv6: don't flush routes when setting loopback down Stephen Hemminger
2010-12-16 23:17 ` 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 [this message]
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=20110119113817.0819ddf1@s6510 \
--to=shemminger@vyatta.com \
--cc=brian.haley@hp.com \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=jbohac@suse.cz \
--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 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).