Linux 3.9 routing oddity

Pierre Emeriaud petrus.lt at gmail.com
Thu Jul 4 13:14:37 CEST 2013


Hello all,

2013/7/2 Pierre Emeriaud <petrus.lt at gmail.com>:
>
> Short story: it ignores a more-specific route if the next-hop is not
> in the neighbour table.

Just a following on this:

This issue was caused by commit 887c95cc1da53f66a5890fdeab13414613010097[0]

It has been corrected in commit 3630d40067a21d4dfbadc6002bb469ce26ac5d52[1]:

ipv6: rt6_check_neigh should successfully verify neigh if no NUD
information are available
After the removal of rt->n we do not create a neighbour entry at route
insertion time (rt6_bind_neighbour is gone). As long as no neighbour
is created because of "useful traffic" we skip this routing entry
because rt6_check_neigh cannot pick up a valid neighbour (neigh ==
NULL) and thus returns false.

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 9ff0b78..bd5fd70 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -551,6 +551,8 @@ static inline bool rt6_check_neigh(struct rt6_info *rt)
         ret = true;
 #endif
      read_unlock(&neigh->lock);
+  } else if (IS_ENABLED(CONFIG_IPV6_ROUTER_PREF)) {
+    ret = true;
   }
   rcu_read_unlock_bh();


Thanks for your help everyone,
rgds,
- pierre.

[0] https://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=887c95cc1da53f66a5890fdeab13414613010097
[1] https://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=3630d40067a21d4dfbadc6002bb469ce26ac5d52



More information about the ipv6-ops mailing list