netifd fails to recover existing VLAN device after daemon restart
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
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.
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
Start with vlandev_set_up() and system_vlandev_add(), then reproduce the netifd restart sequence with an existing VLAN device and inspect the reported claim errors. Done means an existing VLAN such as eth1.100 is recovered and brought up after restart without manually deleting it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100