lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1362409135.15793.93.camel@edumazet-glaptop>
Date:	Mon, 04 Mar 2013 06:58:55 -0800
From:	Eric Dumazet <erdnetdev@...il.com>
To:	Lorenzo Colitti <lorenzo@...gle.com>
Cc:	netdev@...r.kernel.org, Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH] net: ipv6: Don't purge default router if accept_ra=2

On Mon, 2013-03-04 at 15:46 +0900, Lorenzo Colitti wrote:
> Setting net.ipv6.conf.<interface>.accept_ra=2 causes the kernel
> to accept RAs even when forwarding is enabled. However, enabling
> forwarding purges all default routes on the system, breaking
> connectivity until the next RA is received. Fix this by not
> purging default routes on interfaces that have accept_ra=2.
> 
> Signed-off-by: Lorenzo Colitti <lorenzo@...gle.com>
> ---
>  net/ipv6/route.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> index 9282665..e5fe004 100644
> --- a/net/ipv6/route.c
> +++ b/net/ipv6/route.c
> @@ -1915,7 +1915,8 @@ void rt6_purge_dflt_routers(struct net *net)
>  restart:
>  	read_lock_bh(&table->tb6_lock);
>  	for (rt = table->tb6_root.leaf; rt; rt = rt->dst.rt6_next) {
> -		if (rt->rt6i_flags & (RTF_DEFAULT | RTF_ADDRCONF)) {
> +		if (rt->rt6i_flags & (RTF_DEFAULT | RTF_ADDRCONF) &&
> +		    (!rt->rt6i_idev || rt->rt6i_idev->cnf.accept_ra != 2)) {
>  			dst_hold(&rt->dst);
>  			read_unlock_bh(&table->tb6_lock);
>  			ip6_del_rt(rt);

Acked-by: Eric Dumazet <edumazet@...gle.com>




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

Powered by Openwall GNU/*/Linux Powered by OpenVZ