dhcp: reset timeout to zero on startup

Fixes issue where DHCP gets indefinitely stuck when connecting more than once in the same session
This commit is contained in:
itsmattkc committed 2025-02-19 12:42:06 -08:00
1 parent 1f9741e780
commit 3e5b1208af
1 file changed
+2
+2
View File
@@ -304,6 +304,8 @@ int udhcpc_main()
run_script(NULL, "deconfig");
change_mode(LISTEN_RAW);
timeout = 0;
for (;;) {
tv.tv_sec = timeout - uptime();