mirror of
https://github.com/genodelabs/genode.git
synced 2025-05-02 08:42:52 +00:00
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
This commit is contained in:
parent
0d5ed994e2
commit
75ff599a91
@ -61,9 +61,8 @@ class Net::Dhcp_client
|
|||||||
INIT = 0, SELECT = 1, REQUEST = 2, BOUND = 3, RENEW = 4, REBIND = 5
|
INIT = 0, SELECT = 1, REQUEST = 2, BOUND = 3, RENEW = 4, REBIND = 5
|
||||||
};
|
};
|
||||||
|
|
||||||
enum { DISCOVER_TIMEOUT_SEC = 10 };
|
enum { DISCOVER_TIMEOUT_SEC = 2 };
|
||||||
enum { REQUEST_TIMEOUT_SEC = 10 };
|
enum { REQUEST_TIMEOUT_SEC = 2 };
|
||||||
enum { OFFER_TIMEOUT_SEC = 10 };
|
|
||||||
|
|
||||||
Genode::Allocator &_alloc;
|
Genode::Allocator &_alloc;
|
||||||
State _state { State::INIT };
|
State _state { State::INIT };
|
||||||
@ -71,7 +70,6 @@ class Net::Dhcp_client
|
|||||||
unsigned long _lease_time_sec = 0;
|
unsigned long _lease_time_sec = 0;
|
||||||
Genode::Microseconds const _discover_timeout { DISCOVER_TIMEOUT_SEC * 1000 * 1000 };
|
Genode::Microseconds const _discover_timeout { DISCOVER_TIMEOUT_SEC * 1000 * 1000 };
|
||||||
Genode::Microseconds const _request_timeout { REQUEST_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;
|
Nic &_nic;
|
||||||
Dhcp_client_handler &_handler;
|
Dhcp_client_handler &_handler;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user