1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
--- busybox-1.00-pre2/networking/udhcp/dhcpc.c~dhcp-timeout
+++ busybox-1.00-pre2/networking/udhcp/dhcpc.c
@@ -46,6 +46,7 @@
static unsigned long requested_ip; /* = 0 */
static unsigned long server_addr;
static unsigned long timeout;
+static unsigned long retry_time;
static int packet_num; /* = 0 */
static int fd = -1;
@@ -175,6 +176,7 @@
{"quit", no_argument, 0, 'q'},
{"request", required_argument, 0, 'r'},
{"script", required_argument, 0, 's'},
+ {"retrytime", required_argument, 0, 't'},
{"version", no_argument, 0, 'v'},
{0, 0, 0, 0}
};
@@ -182,7 +184,7 @@
/* get options */
while (1) {
int option_index = 0;
- c = getopt_long(argc, argv, "c:fbH:h:i:np:qr:s:v", arg_options, &option_index);
+ c = getopt_long(argc, argv, "c:fbH:h:i:np:qr:s:t:v", arg_options, &option_index);
if (c == -1) break;
switch (c) {
@@ -228,6 +230,9 @@
case 's':
client_config.script = optarg;
break;
+ case 't':
+ retry_time = atol(optarg);
+ break;
case 'v':
bb_error_msg("version %s\n", VERSION);
return(0);
@@ -306,7 +311,7 @@
}
/* wait to try again */
packet_num = 0;
- timeout = now + 60;
+ timeout = now + retry_time;
}
break;
case RENEW_REQUESTED:
|