aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-09-26 09:34:15 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-09-26 09:34:15 +0000
commitcdb0b652ddd6bfbc4d83e21453b3b4137b887e18 (patch)
tree5375d7acab82d7f15eef03c7dc06fbd59d5ed3f4 /networking/udhcp
parentb46d5f9a9368ff3541b6ca5dbe5f0d22d6b8398b (diff)
downloadbusybox-cdb0b652ddd6bfbc4d83e21453b3b4137b887e18.tar.gz
dhcpc: treat "discover...select...discover..." loop the same way
as "discover...discover...discover..."
Diffstat (limited to 'networking/udhcp')
-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)
packet_num++;
continue;
}
+ leasefail:
udhcp_run_script(NULL, "leasefail");
#if BB_MMU /* -b is not supported on NOMMU */
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");
change_listen_mode(LISTEN_RAW);
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;
packet_num = 0;
continue;