aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--networking/udhcp/dhcpc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index 92ebe3676..4cc42eae0 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -363,6 +363,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
363 packet_num++; 363 packet_num++;
364 continue; 364 continue;
365 } 365 }
366 leasefail:
366 udhcp_run_script(NULL, "leasefail"); 367 udhcp_run_script(NULL, "leasefail");
367#if BB_MMU /* -b is not supported on NOMMU */ 368#if BB_MMU /* -b is not supported on NOMMU */
368 if (opt & OPT_b) { /* background if no lease */ 369 if (opt & OPT_b) { /* background if no lease */
@@ -399,6 +400,11 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
399 udhcp_run_script(NULL, "deconfig"); 400 udhcp_run_script(NULL, "deconfig");
400 change_listen_mode(LISTEN_RAW); 401 change_listen_mode(LISTEN_RAW);
401 state = INIT_SELECTING; 402 state = INIT_SELECTING;
403 /* "discover...select...discover..." loops
404 * were seen in the wild. Treat then similarly
405 * to "no response to discover" case */
406 if (state == REQUESTING)
407 goto leasefail;
402 timeout = 0; 408 timeout = 0;
403 packet_num = 0; 409 packet_num = 0;
404 continue; 410 continue;