Subject: Re: [PATCH net-next] ipv6: sysctl to restrict candidate source addresses

From: YOSHIFUJI Hideaki <[email-masked]>
Date: Fri, 03 Jul 2015 16:03:02 +0900

Hi,

Erik Kline wrote:
> Per RFC 6724, section 4, "Candidate Source Addresses":
> 
>     It is RECOMMENDED that the candidate source addresses be the set
>     of unicast addresses assigned to the interface that will be used
>     to send to the destination (the "outgoing" interface).
> 
> Add a sysctl to enable this behaviour.
> 
> Signed-off-by: Erik Kline <[email-masked]>
> ---
>  Documentation/networking/ip-sysctl.txt | 12 ++++++++++++
>  include/linux/ipv6.h                   |  1 +
>  include/uapi/linux/ipv6.h              |  1 +
>  net/ipv6/addrconf.c                    | 30 +++++++++++++++++++++++++-----
>  4 files changed, 39 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
> index 5fae770..d8f3e60 100644
> --- a/Documentation/networking/ip-sysctl.txt
> +++ b/Documentation/networking/ip-sysctl.txt
> @@ -1435,6 +1435,18 @@ mtu - INTEGER
>  	Default Maximum Transfer Unit
>  	Default: 1280 (IPv6 required minimum)
>  
> +restrict_srcaddr - INTEGER
> +	Restrict candidate source addresses (vis. RFC 6724, section 4).
> +
> +	When set to 1, the candidate source addresses for destinations
> +	routed via this interface are restricted to the set of addresses
> +	configured on this interface.
> +
> +	Possible values are:
> +		0 : no source address restrictions
> +		1 : require matching outgoing interface
> +	Default:  0
> +

I cannot get what "restrict" restricts.  How about "use_oif_addr" or
something like that (like use_tempaddr)?

-- 
Hideaki Yoshifuji <[email-masked]>
Technical Division, MIRACLE LINUX CORPORATION