diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-09-26 09:34:15 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-09-26 09:34:15 +0000 |
commit | cdb0b652ddd6bfbc4d83e21453b3b4137b887e18 (patch) | |
tree | 5375d7acab82d7f15eef03c7dc06fbd59d5ed3f4 /networking | |
parent | b46d5f9a9368ff3541b6ca5dbe5f0d22d6b8398b (diff) | |
download | busybox-w32-cdb0b652ddd6bfbc4d83e21453b3b4137b887e18.tar.gz busybox-w32-cdb0b652ddd6bfbc4d83e21453b3b4137b887e18.tar.bz2 busybox-w32-cdb0b652ddd6bfbc4d83e21453b3b4137b887e18.zip |
dhcpc: treat "discover...select...discover..." loop the same way
as "discover...discover...discover..."
Diffstat (limited to 'networking')
-rw-r--r-- | networking/udhcp/dhcpc.c | 6 |
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; |