openwrt / netifd

[MIRROR] OpenWrt Network interface configuration daemon
https://git.openwrt.org/?p=project/netifd.git;
17 stars 19 forks source link

netifd: IP loss on interface after issuing "/etc/init.d/network restart" #22

Closed xsokolikx closed 5 months ago

xsokolikx commented 7 months ago

Details

Configure AP:

When traffic is being generated, disable the AP radios and restart network:

uci set wireless.radio0.disabled=1
uci set wireless.radio1.disabled=1
uci commit wireless 
/etc/init.d/network restart

Sometimes (it doesn't happen always), the interface wan (device br-wan) loss it's IP, and sometimes interface lan (device br-lan) disappears totally.

The following logs are being showed when this happens:

Feb  5 11:44:38 OpenWRT netifd: Network device 'wlan1' link is down
Feb  5 12:44:38 OpenWRT kernel: [ 4416.306722] br-wan: port 2(wlan1) entered disabled state
Feb  5 11:44:41 OpenWRT netifd: wan (8461): udhcpc: broadcasting renew
Feb  5 12:44:41 OpenWRT kernel: [ 4419.307703] br-wan: port 2(wlan1) entered disabled state
Feb  5 12:44:41 OpenWRT kernel: [ 4419.308207] device wlan1 left promiscuous mode
Feb  5 12:44:41 OpenWRT kernel: [ 4419.312205] br-wan: port 2(wlan1) entered disabled state
Feb  5 11:44:42 OpenWRT wpa_supplicant[2191]: Set new config for phy phy1
Feb  5 11:44:42 OpenWRT netifd: Wireless device 'radio0' is now down
Feb  5 11:44:42 OpenWRT netifd: Wireless device 'radio1' is now down
Feb  5 11:44:44 OpenWRT netifd: wan (8461): udhcpc: broadcasting renew
Feb  5 11:44:47 OpenWRT netifd: wan (8461): udhcpc: broadcasting renew
Feb  5 11:44:50 OpenWRT netifd: wan (8461): udhcpc: lease lost, entering init state
Feb  5 11:44:50 OpenWRT netifd: Interface 'wan' has lost the connection
Feb  5 12:44:50 OpenWRT dnsmasq[1]: no servers found in /tmp/resolv.conf.d/resolv.conf.auto, will retry

I checked that reverting https://github.com/openwrt/netifd/commit/c18cc79d50002ab8529c21184aceb016c61ac61c commit solves the issue.

Note: the problem doesn't happen if you replace /etc/init.d/network restart with any of this:

xsokolikx commented 7 months ago

I checked that reverting c18cc79 commit solves the issue.

After several more test, it still fails sometimes even reverting this commit.

lynxis commented 6 months ago

I don't understand the issue. Can you paste the network section of your wan? What members are part of your wan bridge? Do you have an ethernet inter in it? On what platform are you running into this issue?

xsokolikx commented 5 months ago

Closing as I'm unable to reproduce the issue. Sorry for the noise