I have a wan interface which is set as a DHCP client and the issue is that if the modem restarts and there is a link loss, udhcpc
gets a SIGTERM and exits, but the interface remains in an inactive or disabled state unless I restart the entire network ie through /etc/init.d/network restart
.
Even if I try the restart option in Luci for that specific interface, it makes no difference, neither does ifup <interface name>
I've been noticing this issue only in OpenWRT 19.07.2
, it's been working stable in 19.07.0
without issues.
Below shows an example of an occurrence that happened last night. As you can see the interface stays in a disabled
state.
2020 Apr 20 03:06:14 bumblebee notice netifd[]: Interface 'wan2' has link connectivity loss
2020 Apr 20 03:06:14 bumblebee notice netifd[]: wan2 (30260): udhcpc: received SIGTERM
2020 Apr 20 03:06:14 bumblebee notice netifd[]: Interface 'wan2' is now down
2020 Apr 20 03:06:14 bumblebee notice netifd[]: Interface 'wan2' is disabled
2020 Apr 20 03:06:14 bumblebee notice mwan3[3392]: Execute ifdown event on interface wan2 (unknown)
2020 Apr 20 03:06:14 bumblebee info mwan3track[15914]: Detect ifdown event on interface wan2 (eth2)
2020 Apr 20 03:06:14 bumblebee notice mwan3track[15914]: Interface wan2 (eth2) is offline
2020 Apr 20 03:06:16 bumblebee notice netifd[]: Interface 'wan2' has link connectivity
2020 Apr 20 03:06:18 bumblebee notice netifd[]: Interface 'wan2' has link connectivity loss
2020 Apr 20 03:06:19 bumblebee notice netifd[]: Interface 'wan2' has link connectivity
2020 Apr 20 03:06:35 bumblebee notice netifd[]: Interface 'wan2' has link connectivity loss
2020 Apr 20 03:06:37 bumblebee notice netifd[]: Interface 'wan2' has link connectivity
2020 Apr 20 03:06:40 bumblebee notice netifd[]: Interface 'wan2' has link connectivity loss
2020 Apr 20 03:06:41 bumblebee notice netifd[]: Interface 'wan2' has link connectivity
2020 Apr 20 03:06:43 bumblebee notice netifd[]: Interface 'wan2' has link connectivity loss
2020 Apr 20 03:06:45 bumblebee notice netifd[]: Interface 'wan2' has link connectivity
Now if I do a network
restart, the logs are different as you can see the interface is now enabled and udhcpc is started.
2020 Apr 20 13:12:04 bumblebee notice netifd[]: Interface 'wan2' has link connectivity loss
2020 Apr 20 13:12:06 bumblebee notice netifd[]: Interface 'wan2' is enabled
2020 Apr 20 13:12:08 bumblebee notice netifd[]: Interface 'wan2' has link connectivity
2020 Apr 20 13:12:08 bumblebee notice netifd[]: Interface 'wan2' is setting up now
2020 Apr 20 13:12:08 bumblebee notice netifd[]: wan2 (32300): udhcpc: started, v1.30.1
2020 Apr 20 13:12:08 bumblebee notice netifd[]: wan2 (32300): udhcpc: sending discover
2020 Apr 20 13:12:08 bumblebee notice netifd[]: wan2 (32300): udhcpc: sending select for 56.81.103.21
2020 Apr 20 13:12:08 bumblebee notice netifd[]: wan2 (32300): udhcpc: lease of 56.81.103.21 obtained, lease time 7200
2020 Apr 20 13:12:08 bumblebee notice netifd[]: Interface 'wan2' is now up