ubus: improve correspondence between DHCPv[46]
authorDavid Härdeman <[email protected]>
Sat, 4 Oct 2025 17:51:44 +0000 (19:51 +0200)
committerÁlvaro Fernández Rojas <[email protected]>
Tue, 7 Oct 2025 08:52:32 +0000 (10:52 +0200)
The same parameter is called "accept-reconf-nonce" in the "ipv4leases" case and
"accept-reconf" in the "ipv6leases". I couldn't find anything in the OpenWrt
trees which depended on either naming, but renaming the IPv4 case seems to be
the safer bet since it is not part of the standard installation.

Signed-off-by: David Härdeman <[email protected]>
Link: https://github.com/openwrt/odhcpd/pull/267
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
src/ubus.c

index 13a74cc4fbd94c2ccb1c103707bbe344e9d9cec4..5c4a99f4811ae9176148641f42a38c64738b44b4 100644 (file)
@@ -49,7 +49,7 @@ static int handle_dhcpv4_leases(struct ubus_context *ctx, _unused struct ubus_ob
                        blobmsg_add_string_buffer(&b);
 
                        blobmsg_add_string(&b, "hostname", (c->hostname) ? c->hostname : "");
-                       blobmsg_add_u8(&b, "accept-reconf-nonce", c->accept_fr_nonce);
+                       blobmsg_add_u8(&b, "accept-reconf", c->accept_fr_nonce);
 
                        if (c->reqopts_len > 0) {
                                buf = blobmsg_alloc_string_buffer(&b, "reqopts", c->reqopts_len * 4 + 1);