[tools] fix segfault when using the maxlen argument (#4359)
[openwrt.git] / package / busybox / patches / 240-udhcpc_retries.patch
1 --- a/networking/udhcp/dhcpc.c
2 +++ b/networking/udhcp/dhcpc.c
3 @@ -353,7 +353,7 @@ int udhcpc_main(int argc UNUSED_PARAM, c
4
5 switch (state) {
6 case INIT_SELECTING:
7 - if (packet_num < discover_retries) {
8 + if (!discover_retries || packet_num < discover_retries) {
9 if (packet_num == 0)
10 xid = random_xid();
11
12 @@ -384,7 +384,7 @@ int udhcpc_main(int argc UNUSED_PARAM, c
13 continue;
14 case RENEW_REQUESTED:
15 case REQUESTING:
16 - if (packet_num < discover_retries) {
17 + if (!discover_retries || packet_num < discover_retries) {
18 /* send request packet */
19 if (state == RENEW_REQUESTED) /* unicast */
20 send_renew(xid, server_addr, requested_ip);
This page took 0.048918 seconds and 5 git commands to generate.