Subject: Re: [PATCH 2/2] ipv6: Allow accepting RA from local IP addresses.

From: Hannes Frederic Sowa <[email-masked]>
Date: Fri, 20 Jun 2014 17:40:36 +0200

On Mi, 2014-06-18 at 10:50 -0700, [email-masked] wrote:
> From: Ben Greear <[email-masked]>
> 
> This can be used in virtual networking applications, and
> may have other uses as well.  The option is disabled by
> default, so no change to current operating behaviour
> without the user explicitly changing the behaviour.

Can you give a specific example for its use case? I currently don't see
the need for such an option.

> -	if (ipv6_chk_addr(dev_net(in6_dev->dev), &ipv6_hdr(skb)->saddr,
> +	if (!(in6_dev->cnf.accept_ra_from_local ||
> +	      dev_net(in6_dev->dev)->ipv6.devconf_all->accept_ra_from_local) &&
> +	    ipv6_chk_addr(dev_net(in6_dev->dev), &ipv6_hdr(skb)->saddr,
>  			  NULL, 0)) {
>  		ND_PRINTK(2, info,
>  			  "RA: %s, chk_addr failed for dev: %s\n",
> @@ -1293,7 +1295,9 @@ skip_linkparms:
>  	}
>  
>  #ifdef CONFIG_IPV6_ROUTE_INFO
> -	if (ipv6_chk_addr(dev_net(in6_dev->dev), &ipv6_hdr(skb)->saddr,
> +	if (!(in6_dev->cnf.accept_ra_from_local ||
> +	      dev_net(in6_dev->dev)->ipv6.devconf_all->accept_ra_from_local) &&
> +	    ipv6_chk_addr(dev_net(in6_dev->dev), &ipv6_hdr(skb)->saddr,
>  			  NULL, 0)) {
>  		ND_PRINTK(2, info,
>  			  "RA: %s, chk-addr (route info) is false for dev: %s\n",

Maybe ipv6_accept_ra_local() like ipv6_accept_ra() static local to the
file?

Also I am not sure if we want to provide an devconf_all for this setting
at all, like we don't evaluate it for accept_ra, too. At least I
wouldn't do so with the current state of ipv6/conf/{all,default}.

Bye,
Hannes