[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m1mxo5tcx6.fsf@fess.ebiederm.org>
Date: Thu, 16 Dec 2010 17:18:13 -0800
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Stephen Hemminger <shemminger@...tta.com>
Cc: David Miller <davem@...emloft.net>, brian.haley@...com,
netdev@...r.kernel.org, maheshkelkar@...il.com, lorenzo@...gle.com,
yoshfuji@...ux-ipv6.org, stable@...nel.org
Subject: Re: [RFC] ipv6: don't flush routes when setting loopback down
Stephen Hemminger <shemminger@...tta.com> writes:
> 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@...tta.com>
Stephen thanks for this. This patch looks good to me. I just tested
this against 2.6.37-rc6 and my simple tests show it to be working
without problems.
Acked-by: "Eric W. Biederman" <ebiederm@...ssion.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);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists