aboutsummaryrefslogtreecommitdiffstats
path: root/main/busybox/0003-udhcpc-set-default-discover-retries-to-5.patch
blob: bcbc8bc4e62ce65b76dbc00d8ddda8cf2193a5c1 (plain) (blame)
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
From 929842100057fd4cb842129bd5adb5bab167ae92 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Thu, 4 Aug 2016 11:08:35 +0200
Subject: [PATCH 03/15] udhcpc: set default discover retries to 5

Some slower nics needs more attempts to get a lease
---
 networking/udhcp/dhcpc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index fc7b621..e802878 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -1172,7 +1172,7 @@ static void client_background(void)
 //usage:     "\n	-s,--script PROG	Run PROG at DHCP events (default "CONFIG_UDHCPC_DEFAULT_SCRIPT")"
 //usage:     "\n	-p,--pidfile FILE	Create pidfile"
 //usage:     "\n	-B,--broadcast		Request broadcast replies"
-//usage:     "\n	-t,--retries N		Send up to N discover packets (default 3)"
+//usage:     "\n	-t,--retries N		Send up to N discover packets (default 5)"
 //usage:     "\n	-T,--timeout SEC	Pause between packets (default 3)"
 //usage:     "\n	-A,--tryagain SEC	Wait if lease is not obtained (default 20)"
 //usage:     "\n	-n,--now		Exit if lease is not obtained"
@@ -1255,7 +1255,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
 	llist_t *list_x = NULL;
 	int tryagain_timeout = 20;
 	int discover_timeout = 3;
-	int discover_retries = 3;
+	int discover_retries = 5;
 	uint32_t server_addr = server_addr; /* for compiler */
 	uint32_t requested_ip = 0;
 	uint32_t xid = xid; /* for compiler */
-- 
2.9.1