rpcd-mod-luci: correct DUID logic
authorDavid Härdeman <david@hardeman.nu>
Sun, 30 Nov 2025 17:35:56 +0000 (18:35 +0100)
committerPaul Donald <newtwen+github@gmail.com>
Wed, 3 Dec 2025 12:36:29 +0000 (13:36 +0100)
commit3b7869e6dfa2404849036ef8767b240ce48383ac
tree364eb6a2bb75dc4529c552adff991d4921dc2186
parentd96d7cf7986443d9ebb8cf849e03f4f2642cd57f
rpcd-mod-luci: correct DUID logic

dnsmasq writes a statefile for DHCPv4 leases with the MAC address as the
second field and the clientid as the fifth field. The clientid starts
with a type byte (0x01 = ethernet, 0xff = DUID/IAID identifier).

Similarly, odhcpd writes the MAC address as the second field for IPv4
leases.

This patch changes the behaviour of rpcd-mod-luci so that it doesn't
report a non-DUID as a DUID.

Signed-off-by: David Härdeman <david@hardeman.nu>
libs/rpcd-mod-luci/src/luci.c