Skip to content

netifd fails to recover existing VLAN device after daemon restart #75

@ceceliayang-aurora

Description

@ceceliayang-aurora

Description
When netifd is restarted while a VLAN device already exists in the kernel, it fails to bring the VLAN interface back up.

This happens because vlandev_set_up() directly calls system_vlandev_add() without handling the case where the VLAN netdev already exists. As a result, system_vlandev_add() fails and the interface remains down.

Environment
OpenWrt version: (2512)
netifd version / commit: (2025.10.20)
Kernel version: (6.12)
Platform: (Airoha7581)

Steps to reproduce

  1. Configure a VLAN interface (example: eth1.100)
  2. Boot system normally → VLAN interface is up and working
  3. Kill netifd:
    killall netifd
  4. netifd is automatically restarted
  5. Observe that VLAN interface is not properly brought up
Image Image

Observed behavior
The VLAN device (e.g. eth1.100) still exists in kernel after netifd killed or restart
netifd attempts to create it again and fails
Interface remains down
this is the complete log document about restart the netfid
Relevant log:

system_vlandev_add: Error adding vlandev 'eth1.100' over 'eth1': -6
device_claim: claim 8021q eth1.100 failed: -6

log.txt
Workaround
Manually deleting the existing VLAN device allows netifd to recover:

ip link del eth1.100

After this, netifd successfully creates and brings up the interface again.
Additional notes

This issue can be consistently reproduced and is not configuration-dependent.

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