Default gumstix configuration changed
[gumsense-br.git] / package / busybox / busybox-dhcpc-background.patch
blobe3c2e203e5148c3cb7a10c4e8dd5191daba72c05
1 --- a/networking/udhcp/dhcpc.c
2 +++ a/networking/udhcp/dhcpc.c
3 @@ -337,6 +337,7 @@
4 state = INIT_SELECTING;
5 run_script(NULL, "deconfig");
6 change_mode(LISTEN_RAW);
7 + xid = random_xid();
9 for (;;) {
11 @@ -365,10 +366,11 @@
12 /* timeout dropped to zero */
13 switch (state) {
14 case INIT_SELECTING:
15 + if(client_config.background_if_no_lease) {
16 + LOG(LOG_INFO, "Backgrounding");
17 + client_background();
18 + }
19 if (packet_num < client_config.retries) {
20 - if (packet_num == 0)
21 - xid = random_xid();
23 /* send discover packet */
24 send_discover(xid, requested_ip); /* broadcast */
26 @@ -376,16 +378,13 @@
27 packet_num++;
28 } else {
29 run_script(NULL, "leasefail");
30 - if (client_config.background_if_no_lease) {
31 - LOG(LOG_INFO, "No lease, forking to background.");
32 - client_background();
33 - } else if (client_config.abort_if_no_lease) {
34 + if (client_config.abort_if_no_lease) {
35 LOG(LOG_INFO, "No lease, failing.");
36 return 1;
38 /* wait to try again */
39 packet_num = 0;
40 - timeout = now + 60;
41 + timeout = now + 2;
43 break;
44 case RENEW_REQUESTED: