tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: nd6_free assumes all routers are processed by kernel RA
On 23/08/2019 03:09, Robert Elz wrote:
Anyway, the point is that the RA the router sends has no v6 prefixes
to advertise, the router (for v6 purposes) is a router in name only,
it cannot actually forward anything anywhere, as all it sever sees is
link local v6 addresses (which is why it perhaps should not be advertising
itself as a router by sending RA's in the first place, but again, that
is a topic outside the scope of this list.)
The relevance to NetBSD is what a NetBSD client host does with a network
in this state. Clearly it can simply disable v6, and for "fixed" hosts
that is what I do (if/when v6 becomes available, I'll just enable it again).
But for a movable host (ie: laptop) that's not convenient, as it keeps
moving between places where v6 is available (and should be used) and
where it is not.
As things are now (well, a few months ago's kernel, and perhaps just
slightly older dhcpcd) a default v6 route gets installed (caused by the
RA from the router, I assume), but no v6 addresses (except link local).
In that state the kernel attempts to route packets via the router to
any destination that the DNS returns a v6 address for (like *.netbsd.org).
The effect of this is that the alternate v4 addresses (which work fine)
are not attempted until the attempt at a v6 connection times out (several
SYN retransmits with several seconds between each ... long enough to be
highly irritating anyway!) (And no, I do not want to priotorise v4 over
v6 - when v6 is available, and working, I prefer to use it.)
If I simply "route delete -inet6 default" manually, then everything works
normally again for a while (often days) until something happens, and the
route is reinstalled (after which I can delete it again, over and over,
until I happen to be connected to a net where v6 is working.)
There are several ways that we could do better here.
...
Or, we could refuse to automatically add routes when there is no non LL
address available to use them (a faster and less weird alternate to my
current situation where the route gets added, only to soon get deleted again).
https://roy.marples.name/cgit/dhcpcd.git/commit/?id=a3830c3f3d7af8db0353f11a3625979e122819a7
inet6: Don't install a default route if no global address
This works around an issue where some routers advertise themselves
as a default router, but offer no address to actually use.
Thus, it is actually useless as a router.
If an address is added by any other means (DHCPv6, static, etc)
then the default route is installed once more.
This is also dynamic - dhcpcd reacts to addresses being added,
removed, duplicated, detached, etc.
Not sure if the linked patch applies to current as I made some other
changes in this area about reachability as noted on this list earlier.
Robert, could you try my dhcpcd git master and see if it solves your
problem please? Or download a tarball.
git://roy.marples.name/dhcpcd.git
https://roy.marples.name/cgit/dhcpcd.git/snapshot/master.tar.xz
Thanks
Roy
Home |
Main Index |
Thread Index |
Old Index