servers/net: DHCPClient: Hard-code the message IDs.
Even though C++ should increment the enum for us, since these IDs are set and used by things outside of this file, we should hard-code the numbers. No functional change (or if there is, it means there's a compiler bug somewhere.)
This commit is contained in:
@@ -85,14 +85,14 @@ enum message_option {
|
|||||||
|
|
||||||
enum message_type {
|
enum message_type {
|
||||||
DHCP_NONE = 0,
|
DHCP_NONE = 0,
|
||||||
DHCP_DISCOVER,
|
DHCP_DISCOVER = 1,
|
||||||
DHCP_OFFER,
|
DHCP_OFFER = 2,
|
||||||
DHCP_REQUEST,
|
DHCP_REQUEST = 3,
|
||||||
DHCP_DECLINE,
|
DHCP_DECLINE = 4,
|
||||||
DHCP_ACK,
|
DHCP_ACK = 5,
|
||||||
DHCP_NACK,
|
DHCP_NACK = 6,
|
||||||
DHCP_RELEASE,
|
DHCP_RELEASE = 7,
|
||||||
DHCP_INFORM
|
DHCP_INFORM = 8
|
||||||
};
|
};
|
||||||
|
|
||||||
struct dhcp_option_cookie {
|
struct dhcp_option_cookie {
|
||||||
@@ -913,7 +913,7 @@ DHCPClient::_TimeoutShift(int socket, dhcp_state& state, time_t& timeout,
|
|||||||
state = INIT;
|
state = INIT;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
tries++;
|
tries++;
|
||||||
timeout += timeout;
|
timeout += timeout;
|
||||||
if (timeout > MAX_TIMEOUT)
|
if (timeout > MAX_TIMEOUT)
|
||||||
|
|||||||
Reference in New Issue
Block a user