Subject: Re: breakage due to commit 6e617de84e ("net: avoid a full fib lookup when rp_filter is disabled")

From: Paolo Abeni <[email-masked]>
Date: Fri, 27 Oct 2017 14:46:27 +0200

On Thu, 2017-10-26 at 21:50 -0600, David Ahern wrote:
> Your commit:
> 
> commit 6e617de84e87d626d1e976fc30e1322239fd4d2d
> Author: Paolo Abeni <[email-masked]>
> Date:   Wed Sep 20 18:26:53 2017 +0200
> 
>     net: avoid a full fib lookup when rp_filter is disabled.
> 
> breaks a test case that uses a veth pair in the same network namespace
> but separate VRFs. This setup:
> 
> vrf add vrf0 table 1001
> vrf add vrf1 table 1002
> 
> ip link add virt01 type veth peer name virt10
> ip link set virt01 master vrf0
> ip link set virt10 master vrf1
> 
> ip addr add 172.16.20.20/24 dev virt01
> ip link set virt01 up
> 
> ip addr add 172.16.20.21/24 dev virt10
> ip link set virt10 up
> 
> ping -c 1 -I vrf0 172.16.20.21
> 
> fails due to:
> 
>     if (inet_lookup_ifaddr_rcu(net, src))
>        return -EINVAL;
> 
> in fib_validate_source.

Thank you for the report.

Please give me a little time to investigate the issue; unfortunately I
would not be able to work on this untill Monday.

Cheers,

Paolo