Hi people, inspired by the responses to my proposed patch to dhclient[0], I've build a daemon that listens to IPv6 router advertisements and parses dhclient lease files to extract DNS information. This information is then merged and fed to `unbound-control` to update Unbound's forward zone. DHCPv6 support is not done yet, I'm still meditating on how to integrate wide-dhcpv6 painlessly.
This allows me, for example, to use the IPv6-only subnet in my hackerspace without additional set up or configuration such as DHCPv6, since the router advertisements there already contain DNS information via RFC6106 (RDNSS) options. It is also useful because I need special name servers for top level domains not handled by the Internet root DNS while still using dynamically configured DNS servers e.g. for my home because we run a split-horizon DNS there for things like the file server. I'm mainly putting this out here to solicit comments on my coding style and missing features that would make this more useful for other people. One of the things that kind of stumps me at the moment (and which I'd be really really grateful for any insights or thoughts on) is how to handle the following situation: 1. I am at home where I receive DNS information via both RDNSS and DHCP, both pieces of info are entered into Unbound's forward zone 2. I suspend my laptop and resume it at university. Here I don't have RDNSS information available. 3. The RDNSS information does not get replaced with more current info because I don't receive router advertisement that contain any info 4. The IPv6 DNS entry from home lingers in unbounds forward zone My only approach would be using a PF_ROUTE socket to get "hey, your default route just disappeared" as a hint to drop DNS info for a specific IP protocol. This feels like a direct path to race conditions though. If you have a bit of time to spare and are interested in dynamic DNS configuration beyond "use what my IPv4 DHCP gives me", I'd be grateful if you could have a look at it. [0]: https://marc.info/?l=openbsd-tech&m=143730414920578&w=2 [1]: https://github.com/farhaven/dnsfoo -- Gregor