Re: [PATCH v3] ipv6: Not to probe neighbourless routes

From: David Miller
Date: Sat Sep 07 2019 - 09:55:09 EST


From: Cheng Lin <wang.yi59@xxxxxxxxxx>
Date: Fri, 30 Aug 2019 14:11:16 +0800

> Originally, Router Reachability Probing require a neighbour entry
> existed. Commit 2152caea7196 ("ipv6: Do not depend on rt->n in
> rt6_probe().") removed the requirement for a neighbour entry. And
> commit f547fac624be ("ipv6: rate-limit probes for neighbourless
> routes") adds rate-limiting for neighbourless routes.

I am not going to apply this patch.

The reason we handle neighbourless routes is because due to the
disconnect between routes and neighbour entries, we would lose
information with your suggested change.

Originally, all routes held a reference to a neighbour entry.
Therefore we'd always have a neigh entry for any neigh message
matching a route.

But these two object pools (routes and neigh entries) are completely
disconnected. We only look up a neigh entry when sending a packet
on behalf of a route.

Therfore, neigh entries can be purged arbitrarily even if hundreds of
routes refer to them. And this means it is very important to accept
and process probes even for neighbourless routes.

I would also not recommend, in the future, reading RFC requirements
literally without taking into consideration the details of Linux's
specific implementation of ipv6 routing and neighbours.

Thank you.