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
- Configure a VLAN interface (example: eth1.100)
- Boot system normally → VLAN interface is up and working
- Kill netifd:
killall netifd
- netifd is automatically restarted
- Observe that VLAN interface is not properly brought up
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.
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
killall netifdObserved 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:
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.