openwrt / odhcpd

This repository is a mirror of https://git.openwrt.org/?p=project/odhcpd.git. Pull requests will be accepted which will be merged in odhcpd.git
GNU General Public License v2.0
160 stars 96 forks source link

odhcpd lacks hotplug script support #196

Open palonsoro opened 1 year ago

palonsoro commented 1 year ago

I am trying to get automatic DNS resolution for the IPv6 addresses delivered by odhcpd on my Turris Omnia.

After some discussion, it seems this may not be possible (at least in an optimal way) mainly because odhcpd is not notifying of DHCPv6 lease changes via hotplug scripts.

This seems to have been asked in the past in the mail list, but at that time there was not a valid use case to implement it.

So not sure if it would be possible to eventually revisit this topic, as I may have now such valid use case: provide a way to dynamically update DNS server configuration so that it provides up-to-date AAAA records of the server's DHCPv6 clients.

If I missed something and/or there is some alternative suggestion, I am also open to it.

Thanks in advance.

palonsoro commented 1 year ago

Any thoughts on this?

mikma commented 1 year ago

Since odhcpd broadcasts ubus events for dhcpv4 leases, it seams reasonable to do the same for dhcpv6 leases. I have a PoC implementation in my fork which also contains a lua script which is able to update a WireGuard interface based on odhcpd leases.

https://github.com/mikma/openwrt-odhcpd/commits/wireguard