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

FS#4042 - netifd forces up dhcp interfaces set admin-down with "ip link set $I down" #9030

Open
openwrt-bot opened this issue Sep 17, 2021 · 0 comments
Labels
flyspray release/21.02 pull request/issue targeted (also) for OpenWrt 21.02 release

Comments

@openwrt-bot
Copy link

BradG:

netifd will immediately and automatically set an interface active/up which has been administratively disabled with either the "ip link set $I down" or "ifconfig $I down" commands.

This problem will only occur if the interface proto is configured for "dhcp" rather than "static". This appears to be related to the behavior induced by the "force_link" option, however force_link suppresses hotplug events (which breaks my use-case) and probably has other undesirable side-effects.

Below is a sample log where "ip link set eth0.1 down" is used against the "lan" interface-configuration. Note that identical behavior is also observed on a typical ethernet interface (eth0) where there is no intermediate switch or VLAN-interfaces involved.

Sat Sep 11 00:39:59 2021 daemon.notice netifd: VLAN 'eth0.1' link is down
Sat Sep 11 00:39:59 2021 daemon.notice netifd: Interface 'lan' has link connectivity loss
Sat Sep 11 00:39:59 2021 kern.info kernel: [48844.417075] device eth0 left promiscuous mode
Sat Sep 11 00:39:59 2021 daemon.notice netifd: lan (28106): udhcpc: received SIGTERM
Sat Sep 11 00:39:59 2021 daemon.notice netifd: Interface 'lan' is now down
Sat Sep 11 00:39:59 2021 daemon.notice netifd: Interface 'lan' is disabled
Sat Sep 11 00:39:59 2021 daemon.notice netifd: Interface 'lan' is enabled
Sat Sep 11 00:39:59 2021 daemon.notice netifd: VLAN 'eth0.1' link is up
Sat Sep 11 00:39:59 2021 daemon.notice netifd: Interface 'lan' has link connectivity
Sat Sep 11 00:39:59 2021 daemon.notice netifd: Interface 'lan' is setting up now
Sat Sep 11 00:39:59 2021 daemon.notice netifd: lan (29997): udhcpc: started, v1.30.1
Sat Sep 11 00:39:59 2021 kern.info kernel: [48845.042493] device eth0 entered promiscuous mode
Sat Sep 11 00:39:59 2021 daemon.notice netifd: lan (29997): udhcpc: sending discover
Sat Sep 11 00:39:59 2021 daemon.notice netifd: lan (29997): udhcpc: sending select for 192.168.0.148
Sat Sep 11 00:39:59 2021 daemon.notice netifd: lan (29997): udhcpc: lease of 192.168.0.148 obtained, lease time 43200
Sat Sep 11 00:40:00 2021 daemon.notice netifd: Interface 'lan' is now up
Sat Sep 11 00:40:01 2021 user.notice firewall: Reloading firewall due to ifup of lan (eth0.1)

This behavior was verified on multiple 21.02 and 19.07 devices.

@aparcar aparcar added the release/21.02 pull request/issue targeted (also) for OpenWrt 21.02 release label Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray release/21.02 pull request/issue targeted (also) for OpenWrt 21.02 release
Projects
None yet
Development

No branches or pull requests

2 participants