odhcpd: remove the "ra_management" option
authorDavid Härdeman <[email protected]>
Sun, 26 Oct 2025 08:33:17 +0000 (09:33 +0100)
committerÁlvaro Fernández Rojas <[email protected]>
Thu, 6 Nov 2025 07:24:51 +0000 (08:24 +0100)
The option is marked as deprecated since 2019 in the odhcpd code base.

It has been superseded by the "ra_flags" and "ra_slaac" options, which provide
more fine-grained control, and having several different configuration options
controlling the same thing is a potential source of confusion.

The option is, and has always been, undocumented.

Furthermore, I've grepped through the LuCI source tree, and it contains logic
to control "ra_flags" and "ra_slaac", but no references to "ra_management" at
all.

The only references in the openwrt tree is inside the dnsmasq init script, but
that is a dnsmasq-internal thing and, again, the option cannot be set from
LuCI, meaning I think we can assume that it has limited usage.

So, remove it.

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

index e483456bda2253a3c60440e947b8adb95d81d6cf..8e70f8591433dcc34e7e50702bf343e914f3748f 100644 (file)
--- a/README.md
+++ b/README.md
@@ -119,7 +119,6 @@ and may also receive information from ubus
 | ndp_from_link_local  |bool   | 1     | Use link-local source addresses for NDP operations (RFC 4861, §4.2 compliance) and macOS compatibility |
 | prefix_filter                |string |`::/0` | Only advertise on-link prefixes within the provided IPv6 prefix; others are filtered out. [IPv6 prefix] |
 | ntp                  |list   |`<local address>`| NTP servers to announce accepts IPv4 and IPv6 |
-| ra_management                |string | -     | TBD |
 | upstream             |list   | -     | TBD |
 | ra_advrouter         |bool   | -     | TBD |
 
index ebd9253a80cc33d230c570cecb83f5918456a094..4bf8b2aa109fcecfc89d1f36aba3156cb8d50cb5 100644 (file)
@@ -112,7 +112,6 @@ enum {
        IFACE_ATTR_DHCPV6_NA,
        IFACE_ATTR_DHCPV6_HOSTID_LEN,
        IFACE_ATTR_RA_DEFAULT,
-       IFACE_ATTR_RA_MANAGEMENT,
        IFACE_ATTR_RA_FLAGS,
        IFACE_ATTR_RA_SLAAC,
        IFACE_ATTR_RA_OFFLINK,
@@ -164,7 +163,6 @@ static const struct blobmsg_policy iface_attrs[IFACE_ATTR_MAX] = {
        [IFACE_ATTR_DHCPV6_NA] = { .name = "dhcpv6_na", .type = BLOBMSG_TYPE_BOOL },
        [IFACE_ATTR_DHCPV6_HOSTID_LEN] = { .name = "dhcpv6_hostidlength", .type = BLOBMSG_TYPE_INT32 },
        [IFACE_ATTR_RA_DEFAULT] = { .name = "ra_default", .type = BLOBMSG_TYPE_INT32 },
-       [IFACE_ATTR_RA_MANAGEMENT] = { .name = "ra_management", .type = BLOBMSG_TYPE_INT32 },
        [IFACE_ATTR_RA_FLAGS] = { .name = "ra_flags", . type = BLOBMSG_TYPE_ARRAY },
        [IFACE_ATTR_RA_SLAAC] = { .name = "ra_slaac", .type = BLOBMSG_TYPE_BOOL },
        [IFACE_ATTR_RA_OFFLINK] = { .name = "ra_offlink", .type = BLOBMSG_TYPE_BOOL },
@@ -1427,27 +1425,6 @@ int config_parse_interface(void *data, size_t len, const char *name, bool overwr
        if ((c = tb[IFACE_ATTR_RA_DEFAULT]))
                iface->default_router = blobmsg_get_u32(c);
 
-       /* IFACE_ATTR_RA_MANAGEMENT aka ra_management is deprecated since 2019 */
-       if (!tb[IFACE_ATTR_RA_FLAGS] && !tb[IFACE_ATTR_RA_SLAAC] &&
-               (c = tb[IFACE_ATTR_RA_MANAGEMENT])) {
-               switch (blobmsg_get_u32(c)) {
-               case 0:
-                       iface->ra_flags = ND_RA_FLAG_OTHER;
-                       iface->ra_slaac = true;
-                       break;
-               case 1:
-                       iface->ra_flags = ND_RA_FLAG_OTHER|ND_RA_FLAG_MANAGED;
-                       iface->ra_slaac = true;
-                       break;
-               case 2:
-                       iface->ra_flags = ND_RA_FLAG_OTHER|ND_RA_FLAG_MANAGED;
-                       iface->ra_slaac = false;
-                       break;
-               default:
-                       break;
-               }
-       }
-
        if ((c = tb[IFACE_ATTR_RA_FLAGS])) {
                iface->ra_flags = 0;