[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: udhcpc -n option
From: Denys Vlasenko <vda.linux () googlemail ! com>
Date: 2009-08-12 23:27:26
Message-ID: 1158166a0908121627l71d4bf23ga347c4057668eb81 () mail ! gmail ! com
[Download RAW message or body]
On Wed, Aug 12, 2009 at 11:04 PM, Justin Maggard<jmaggard10@gmail.com> wrote:
> I understand that when you use the -n option to udhcpc, it will quit
> if it's not able to immediately get an IP address. What isn't
> apparent though, is that if the initial request succeeds, but a
> subsquent renew fails to get an IP address, udhcpc will also quit.
> For me at least, this was unexpected, since the --help description
> only mentions changing the initial behavior and doesn't say anything
> about changing renew behavior. The following patch makes things work
> like I was expecting. Feel free to ignore this if it's supposed to
> work this way. :)
>
> -Justin
>
> --- busybox-1.14.3/networking/udhcp/dhcpc.c Sun Aug 2 18:16:36 2009
> +++ busybox-1.14.3-new/networking/udhcp/dhcpc.c Wed Aug 12 16:53:16 2009
> @@ -587,6 +587,7 @@ int udhcpc_main(int argc UNUSED_PARAM, c
>
> state = BOUND;
> change_listen_mode(LISTEN_NONE);
> + opt &= ~OPT_n; /* JM - don't
> quit if a future renew fails */
> if (opt & OPT_q) { /* quit after lease */
> if (opt & OPT_R) /*
> release on quit */
>
Applied, thanks!
--
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic