dhcpc: treat "discover...select...discover..." loop the same way
as "discover...discover...discover..."
This commit is contained in:
parent
b46d5f9a93
commit
cdb0b652dd
@ -363,6 +363,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
packet_num++;
|
packet_num++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
leasefail:
|
||||||
udhcp_run_script(NULL, "leasefail");
|
udhcp_run_script(NULL, "leasefail");
|
||||||
#if BB_MMU /* -b is not supported on NOMMU */
|
#if BB_MMU /* -b is not supported on NOMMU */
|
||||||
if (opt & OPT_b) { /* background if no lease */
|
if (opt & OPT_b) { /* background if no lease */
|
||||||
@ -399,6 +400,11 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
udhcp_run_script(NULL, "deconfig");
|
udhcp_run_script(NULL, "deconfig");
|
||||||
change_listen_mode(LISTEN_RAW);
|
change_listen_mode(LISTEN_RAW);
|
||||||
state = INIT_SELECTING;
|
state = INIT_SELECTING;
|
||||||
|
/* "discover...select...discover..." loops
|
||||||
|
* were seen in the wild. Treat then similarly
|
||||||
|
* to "no response to discover" case */
|
||||||
|
if (state == REQUESTING)
|
||||||
|
goto leasefail;
|
||||||
timeout = 0;
|
timeout = 0;
|
||||||
packet_num = 0;
|
packet_num = 0;
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user