From 75ff599a9108c20b38dd73ec5b0c3f90402cdb8a Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Thu, 17 May 2018 11:31:23 +0200 Subject: [PATCH] ping: shorter retry timeouts in DHCP client Set DHCP-DISCOVER retry timeout and DHCP-REQUEST retry timeout from 10 seconds to 2 seconds. This prevents problems with tests where the NIC driver comes up slowly and the first packets of the DHCP client get dropped. Issue #2837 --- repos/os/src/app/ping/dhcp_client.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/repos/os/src/app/ping/dhcp_client.h b/repos/os/src/app/ping/dhcp_client.h index 24094d7d5..0f52d6ba9 100644 --- a/repos/os/src/app/ping/dhcp_client.h +++ b/repos/os/src/app/ping/dhcp_client.h @@ -61,9 +61,8 @@ class Net::Dhcp_client INIT = 0, SELECT = 1, REQUEST = 2, BOUND = 3, RENEW = 4, REBIND = 5 }; - enum { DISCOVER_TIMEOUT_SEC = 10 }; - enum { REQUEST_TIMEOUT_SEC = 10 }; - enum { OFFER_TIMEOUT_SEC = 10 }; + enum { DISCOVER_TIMEOUT_SEC = 2 }; + enum { REQUEST_TIMEOUT_SEC = 2 }; Genode::Allocator &_alloc; State _state { State::INIT }; @@ -71,7 +70,6 @@ class Net::Dhcp_client unsigned long _lease_time_sec = 0; Genode::Microseconds const _discover_timeout { DISCOVER_TIMEOUT_SEC * 1000 * 1000 }; Genode::Microseconds const _request_timeout { REQUEST_TIMEOUT_SEC * 1000 * 1000 }; - Genode::Microseconds const _offer_timeout { OFFER_TIMEOUT_SEC * 1000 * 1000 }; Nic &_nic; Dhcp_client_handler &_handler;