Comment 8 for bug 1004775

The automatic route adds were causing me trouble (getting in the way of an unmanaged vpn), so I did some digging and experiments.

Without "Ignore automatically obtained routes": any IPv6 route lookup for a host that hasn't been looked up already causes NetworkManager to do two things, both of which are undesirable:
* It restarts dnsmasq
* It adds a host route (/128) for the address that was looked up, via the current default gateway (not sure whether it's based on a kernel route lookup, or NM's idea of the default gateway, since they're congruent in my configuration).

I can reproduce this without sending any traffic, a simple "ip -6 route get foo" triggers it.

Turning on debugging shows that NM receives an add/del route netlink message to trigger this. My guess based on that is that there's a bug in the route handling code, and it's interpreting a message from the kernel saying "this route was looked up" as a message saying "this route was added". Then it adds it to its internal table and syncs the internal table back to the kernel table, adding the spurious route to the kernel.

I don't know enough about netlink messages to actually find the bug, though; trying to read the code has me completely lost.

With "Ignore automatically obtained routes" turned on, it behaves correctly. Route lookups have no special effects, and it still handles the default route it automatically obtained from RAs. Documentation implies that it will reject routes learned via RA and DHCPv6, which it doesn't do.