Re: [PATCH net] Don't allow overwrite of config src addr

2017-02-20 Thread Sergei Shtylyov

Hello!

On 02/20/2017 08:03 PM, Brian Russell wrote:


When using IPv6 transport and a default dst, a pointer to the configured
source address is passed into the route lookup. If no source address is
configured, then the value is overwritten.

IPv6 route lookup ignores egress ifindex match if the source adress is set,


   Address. Perhaps can be fixed while applying?


so if egress ifindex match is desired, the source address must be passed
as any. The overwrite breaks this for subsequent lookups.

Avoid this by copying the configured address to an existing stack variable
and pass a pointer to that instead.

Signed-off-by: Brian Russell 

[...]

MBR, Sergei



Re: [PATCH net] Don't allow overwrite of config src addr

2017-02-21 Thread David Miller
From: Brian Russell 
Date: Mon, 20 Feb 2017 17:03:54 +

> When using IPv6 transport and a default dst, a pointer to the configured
> source address is passed into the route lookup. If no source address is
> configured, then the value is overwritten.
> 
> IPv6 route lookup ignores egress ifindex match if the source adress is set,
> so if egress ifindex match is desired, the source address must be passed
> as any. The overwrite breaks this for subsequent lookups.
> 
> Avoid this by copying the configured address to an existing stack variable
> and pass a pointer to that instead.
> 
> Signed-off-by: Brian Russell 

I really would like you to try and find a way to avoid this address copy.
It means even with a cached route, we are going to copy a 128-bit address
onto the stack _every single_ packet vxlan transmits.