summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-10-08 21:05:46 (GMT)
committer Denys Vlasenko <vda.linux@googlemail.com>2009-10-08 21:05:46 (GMT)
commit219757fee9a1cacedaffcfe062254adb2ffe7cac (patch)
treee071a21bbac24b095a12c44ff37f894071b5735b
parent6332151641f2c80c0ca57bd2f7dd11393619bc3a (diff)
downloadbusybox-219757fee9a1cacedaffcfe062254adb2ffe7cac.tar.gz
busybox-219757fee9a1cacedaffcfe062254adb2ffe7cac.tar.bz2
udhcpc: fix bug 629: use bcast receive when we perform rebinding
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--networking/udhcp/dhcpc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index ccc0393..9a2fe35 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -451,6 +451,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
state = REBINDING;
/* fall right through */
case REBINDING:
+ /* Switch to bcast receive */
+ change_listen_mode(LISTEN_RAW);
/* Lease is *really* about to run out,
* try to find DHCP server using broadcast */
if (timeout > 0) {
@@ -462,7 +464,6 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
/* Timed out, enter init state */
bb_info_msg("Lease lost, entering init state");
udhcp_run_script(NULL, "deconfig");
- change_listen_mode(LISTEN_RAW);
state = INIT_SELECTING;
/*timeout = 0; - already is */
packet_num = 0;