Skip to content

netifd_add_dynamic(): missing duplicate check causes endless restart loop #72

@Sm00shed

Description

@Sm00shed

This issue is related to openwrt/openwrt#21422
(openwrt/openwrt#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions