Subject: Re: Missing IPv4 routes

From: Brian Rak <[email-masked]>
Date: Tue, 27 Oct 2015 16:01:36 -0400

(Existing email got kinda messy, starting over again):

So, I'm having an issue with the kernel where if I add a bunch of 
routes, I see some of them go "missing".  They don't show up in the 'ip 
-4 route' list, but they do show up if I do 'ip -4 route get X'.

I managed to come up with a simple set of reproduction commands:

ip link add veth0 type veth peer name veth1
ip link set veth0 up
ip link set veth1 up

ip route add 108.61.171.119/32 dev veth0  scope link
ip route add 108.61.171.141/32 dev veth1  scope link
ip route add 108.61.171.223/32 dev veth1  scope link
ip route add 108.61.171.250/32 dev veth1  scope link
ip route add 108.61.171.247/32 dev veth1  scope link

ip route show

In the route show, you'll see 108.61.171.250/32 and 108.61.171.247/32 
missing completely.

I did a lot of bisecting, and traced it down to this commit:

commit 8be33e955cb959dabc1a6eef0b7356fe8cf73fa6
Author: Alexander Duyck <[email-masked]>
Date:   Wed Mar 4 14:59:19 2015 -0800

     fib_trie: Fib walk rcu should take a tnode and key instead of a 
trie and a leaf

The commit immediately prior to this one 
(7289e6ddb633aaee6ccea2bd2e410654c47b29a6) works fine.

I tried the off-by-one fix from 
e55ffaf457bcc8ec4e9d9f56f955971f834d65b3, however this doesn't appear to 
help at all.   This code is a little above my head, so I don't really 
understand what exactly is broken here.