netifd: not bringing up tunnel interface with NO_DEVICE
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
Randomly, changing some configuration parameters or creating a 6in4 or wireguard interface leads to netifd not being able to bring up the interface when running ifup, with ifstatus returning NO_DEVICE.
OpenWrt version
r23497-6637af95aa
OpenWrt release
23.05.0
OpenWrt target/subtarget
ramips/mt7621
Device
UniElec U7621-06 (16M flash)
Image kind
Official downloaded image
Steps to reproduce
Config:
config interface 'wan6'
option proto '6in4'
option peeraddr 'xxx.xxx.xxx.xxx'
option ip6addr '2a0e:97c0:38f:fffd::1/64'
list ip6prefix '2a0e:97c0:38f::/64'
option ip6assign '64'
option mtu '1472'
option ipaddr 'yyy.yyy.yyy.yyy'
option ttl '255'
Debug config in /etc/init.d/network:
start_service() {
init_switch
procd_open_instance
procd_set_param command /sbin/netifd -l 5 -d 15
procd_set_param stdout 1
procd_set_param stderr 1
procd_set_param respawn
procd_set_param watch network.interface
[ -e /proc/sys/kernel/core_pattern ] && {
procd_set_param limits core="unlimited"
}
procd_close_instance
}
Logs (no errors or debug-level logs strangely):
Sun Feb 11 17:42:59 2024 daemon.err netifd[1493]: device_apply_config(1188): Device 'br-lan': config applied
Sun Feb 11 17:42:59 2024 daemon.err netifd[1493]: interface_update(1402): Update interface 'loopback'
Sun Feb 11 17:42:59 2024 daemon.err netifd[1493]: interface_update(1402): Update interface 'lan'
Sun Feb 11 17:42:59 2024 daemon.err netifd[1493]: interface_add_dns_server(1435): Add IPv4 DNS server: 192.168.69.1
Sun Feb 11 17:42:59 2024 daemon.err netifd[1493]: interface_update(1402): Update interface 'wan'
Sun Feb 11 17:42:59 2024 daemon.err netifd[1493]: interface_update(1402): Update interface 'wan6'
Sun Feb 11 17:42:59 2024 daemon.err netifd[1493]: interface_update(1402): Update interface 'wg_securebit'
Sun Feb 11 17:42:59 2024 daemon.err netifd[1493]: wdev_update(754): Update wireless device 'radio0'
Sun Feb 11 17:42:59 2024 daemon.err netifd[1493]: wdev_update(754): Update wireless device 'radio1'
Creating the interface through luci yields the same result.
Actual behaviour
Running ifup does not create the iface, with ifstatus returning NO_DEVICE.
Same thing happens when restarting the interface through luci, even across reboots.
Deleting and recreating the config of the same exact interface a few times fixes.
Expected behaviour
The interface gets created correctly.
Additional info
No response
Diffconfig
No response
Terms
- I am reporting an issue for OpenWrt, not an unsupported fork.
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 by reproducing the 6in4 configuration with the /etc/init.d/network debug settings, then run ifup and ifstatus while reviewing the netifd logs. Compare the behavior with a freshly recreated interface and trace the netifd entry points involved in tunnel creation; done means the configured tunnel is created reliably and no longer reports NO_DEVICE.
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
- Needs clarification
- Newbie friendliness
- 35/100