Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netifd: not bringing up tunnel interface with NO_DEVICE #32

Open
1 task done
danog opened this issue Aug 15, 2024 · 1 comment
Open
1 task done

netifd: not bringing up tunnel interface with NO_DEVICE #32

danog opened this issue Aug 15, 2024 · 1 comment

Comments

@danog
Copy link

danog commented Aug 15, 2024

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.
@arvindselva
Copy link

Hi,

Any update on this ticket?
I'm also facing the same issue in my openwrt device.
ifstatus of map-e interface shows no device.

{
        "up": false,
        "pending": false,
        "available": false,
        "autostart": true,
        "dynamic": false,
        "proto": "map",
        "data": {

        },
        "errors": [
                {
                        "subsystem": "interface",
                        "code": "NO_DEVICE"
                }
        ]
}

My network map config looks like this.

config interface 'wan6'
        option ifname 'eth1'
        option ipv6 '1'
        option proto 'static'
        option mtu '1500'
        option defaultroute '0'
        option ip6addr '2001:db8::100'
        option ip6gw '2001:db8::1'
        option ip6prefix '2001:db8::/64'

config interface 'wan6_map'
	option proto 'map'
	option type 'map-e'
	option tunlink 'wan6'
	option mtu '1500'
	option ttl '255'
	option ipaddr '192.168.1.0'
	option ip4prefixlen '24'
	option ip6prefix '2001:db8::'
	option ip6prefixlen '40'
	option peeraddr '2001:db8::1'
	option ealen '16'
	option psidlen '8'
	option psid '52'
	option offset '6'

I do have the map and nat46 modules installed in my device.

root:/# opkg list-installed | grep map
map - 4-13
root/# opkg list-installed | grep nat46
kmod-nat46 - 4.14.275+0000000-1

Please let me know what am I missing here.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants