[bug] netifd_add_dynamic(): missing duplicate check causes endless restart loop
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
This issue is related to openwrt/openwrt#21422
(https://github.com/openwrt/openwrt/issues/21422)
where the same symptom was reported and worked around, but the root cause was not identified.
I can confirm this from personal experience – I am running PPPoE with IPv6 and configured wan6 with option device @wan. The result was an endless restart loop. Renaming wan6 to wan_6 resolved the symptom but not the underlying cause.
Root cause (confirmed – PPPoE + IPv6):
netifd_add_dynamic() in ubus.c does not check whether an interface with the same parent_ifname and proto_handler already exists. When wan6 is configured in UCI, dhcpv6.sh calls add_dynamic("wan_6") – netifd creates this without checking for the conflict → endless loop.
Potentially affected scenarios (code-based, not personally verified):
PPPoE + IPv6 (confirmed): dhcpv6.script creates wan_6, conflicts with UCI wan6
DS-Lite: dhcpv6.script creates wan6_4, may conflict with UCI wan6_4
MAP-E / lw4o6: dhcpv6.script creates wan6_4, may conflict with UCI wan6_4
464XLAT: dhcpv6.script creates wan6_4, may conflict with UCI wan6_4
6rd: dhcp.script creates wan_6, may conflict with UCI wan6
These are personal observations from reading the source code – not a professional assessment. Corrections are welcome.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read netifd_add_dynamic() in ubus.c first, then compare the dynamic-interface creation paths in dhcpv6.sh and dhcp.script. Reproduce the PPPoE plus IPv6 configuration if possible; done means conflicting dynamic interfaces are handled without duplicate creation and the endless restart loop no longer occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100