Migrating ISC to Kea DHCP blocked on related PR's

Philip Prindeville philipp_subx at redfish-solutions.com
Sat Dec 9 14:47:18 PST 2023


Hi all,

I'm working on a drop-in for Kea that will parse existing ISC-DHCP configurations in UCI and crank out the derivative JSON config files for Kea, but I have a couple of PR's that are necessary to making this happen that have been pending for several weeks:

https://github.com/openwrt/openwrt/pull/13765
https://github.com/openwrt/libubox/pull/6

The first PR takes the original ipcalc.sh (which, despite its name, was an AWK script for calculating subnet ranges for DHCP pools)  and rewrites it both as a Shell library for manipulating IP addresses, subnets, masks, prefixes, etc. as well as a front-end ipcalc.sh that leverages this library and provides the original functionality of ipcalc.sh for scripts still requiring such.

The need to rewrite as a library was so that better error checking could be done in the initialization script for Kea, as well as the need to associate host leases back to their relevant subnet (since reservations are more efficiently done on per-interface basis, than globally, which doesn't scale up).

The 2nd PR includes improvements to libubox's jshn.sh, in particular the ability to save the "cursor" as one builds multiple empty tables, and then come back to them (by repositioning the cursor) on a subsequent pass to populate them.  As you probably guessed, interface tables as created in one pass in the Kea init.d script, and then the host reservations are plugged into them after the reserved address is mapped back to the corresponding subnet/interface pair on the 2nd pass.

This requires "warping" the cursor to the appropriate table, as there is no requirement for ordering of DHCP host reservations vis-a-vis DHCP subnet definitions, etc.

Small COTS WAP's and low-cost routers might be good candidates for dnsmasq, but there are a lot of people using 1U x86_64 or ARM64 pizza boxes with a half dozen or more interfaces in a medium-sized or even branch enterprise scenario who run ISC-DHCP (and soon, hopefully, Kea).

Help me support those users by reviewing these PRs so I can move them forward to merger.

Thanks,

-Philip




More information about the openwrt-devel mailing list