On Tue, Aug 06, 2013 at 11:33:29AM +1000, Olivier Mehani wrote: > Hey Kenneth, > > On Mon, Aug 05, 2013 at 09:07:24PM -0400, Kenneth R Westerback wrote: > > > > I am unsure why dhclient touches the v6 routing table. Is this an > > > > unwanted side effect when it eventually refreshes the v4 default > > > > gateway, e.g. a bug? > > It should not be touching the v6 routing table. If it does, then this is > > a bug. priv_flush_routes() assumes that specifying mib[3] = AF_INET will > > prevent any IPv6 routes from being reported and thus zapped. If this is > > not working ... > > AFAIK, priv_flush_routes() is only called on cleanup, not when a new > lease is to be set, nor as a follow-up to flush_routes(). The latter > however is a bit cryptic to me, and I am not sure what it does exactly, > but there surely isn't any AF_INET specification.
flush_routes() issues IMSG_FLUSH_ROUTES imsg. This is caught in dispatch_imsg(), where it results in priv_flush_routes() being called. The general mechanism and naming convention should be consistant. i.e. blah() issues IMSG_BLAH, which is caught in dispatch_imsg() where the parameters are unpacked and priv_blah() is called to actually do something. blah() is called by the non-privileged process and priv_blah() is executed in the privileged process. The two are connected by an imsg socket. In some cases the privileged process calls the priv_blah() functions directly. > > > > Same here. This is odd. Maybe the IPv6 default route gets overwritten at > > > the same time as the IPv4 one. > > Since add_route() explicitly specifies *.sin_family = AF_INET, the > > assumption again is that IPv6 routing table entries should not be > > affected. > > priv_add_route() does, but add_route() doesn't. I'm not familiar with > how the imsg are handled, so I might be missing something that would > have priv_add_route() be called in response to something add_route() > did. (and s/add/flush/g). See above. add_route() issues IMSG_ADD_ROUTE which is caught in dispatch_imsg(), where priv_add_route() is called. > > > > Running dhclient from CURRENT therefore seems to be a good workaround, > > > but I doubt the lease management is the cause of the problem. Rather, I > > > still suspect that flush_routes() is closer to the culprit. > > > I'll file a bug. > > Well, if it's working in -current, what's the bug? > > I think the fact that it works is a side effect of the change of 1.260, > rather than the potential bug (as you pointed out earlier) being fixed. > > -- > Olivier Mehani <[email protected]> > PGP fingerprint: 4435 CF6A 7C8D DD9B E2DE F5F9 F012 A6E2 98C6 6655 You don't mention which version of dhclient you are running. .... Ken
