luci-mod-network: DHCPv6-PD cannot be disabled through LuCI

Open Beginner friendly
#8,982 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript

Research direction

Start at the LuCI path Network → Interfaces → LAN → DHCP Server → DHCPv6 Settings and trace how the DHCPv6-PD checkbox is saved to UCI. Reproduce with the provided uci commands, then verify that unchecking writes dhcpv6_pd='0' and that an absent option is displayed as enabled.

Written by the indexing model from the issue text.

Description

Is there an existing issue for this?
  • I have searched among all existing issues (including closed issues)
screenshots or captures

No response

Actual behaviour

In LuCI, the DHCPv6-PD option cannot be disabled because unchecking it removes the UCI option instead of setting it to 0.

The option is removed completely instead of being set to: option dhcpv6_pd '0'
Since odhcpd defaults dhcpv6_pd to 1 when the option is absent, DHCPv6-PD remains enabled.
Therefore, LuCI cannot disable DHCPv6-PD.

Expected behaviour

Unchecking DHCPv6-PD should write: option dhcpv6_pd '0'
When the option is absent, LuCI should also display it as enabled, matching the odhcpd default.

Steps to reproduce
  1. Set the option explicitly:

    uci set dhcp.lan.dhcpv6_pd='1'
    uci commit dhcp
    
  2. Open:
    Network → Interfaces → LAN → DHCP Server → DHCPv6 Settings

  3. Uncheck DHCPv6-PD and click Save & Apply.

  4. Check the value:
    uci -q get dhcp.lan.dhcpv6_pd

Additional Information
{
	"kernel": "6.12.94",
	"hostname": "OpenWrt",
	"system": "QEMU Virtual CPU version 2.5+",
	"model": "QEMU Standard PC (Q35 + ICH9, 2009)",
	"board_name": "qemu-standard-pc-q35-ich9-2009",
	"rootfs_type": "ext4",
	"release": {
		"distribution": "OpenWrt",
		"version": "25.12.5",
		"firmware_url": "https://downloads.openwrt.org/",
		"revision": "r33051-f5dae5ece4",
		"target": "x86/64",
		"description": "OpenWrt 25.12.5 r33051-f5dae5ece4",
		"builddate": "1782737960"
	}
}
What browsers do you see the problem on?

Chrome

Relevant log output

Dominant language
JavaScript
Stars
7.9k
Forks
2.9k
Avg merge
4d 5h
Merged PRs (30d)
30

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openwrt/luci

All issues in openwrt/luci

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.