mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-12-06 02:01:34 +03:00
Ensure DHCP resend interval is not to long
This commit is contained in:
@ -899,7 +899,7 @@ DHCPV4_DATA *IPCSendDhcpRequest(IPC *ipc, IP *dest_ip, UINT tran_id, DHCP_OPTION
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Retransmission interval
|
// Retransmission interval
|
||||||
resend_interval = MAX(1, (timeout / 3) - 100);
|
resend_interval = MIN(IPC_DHCP_MAX_RESEND_INTERVAL, MAX(1, (timeout / 3) - 100));
|
||||||
|
|
||||||
// Time-out time
|
// Time-out time
|
||||||
giveup_time = Tick64() + (UINT64)timeout;
|
giveup_time = Tick64() + (UINT64)timeout;
|
||||||
|
|||||||
@ -19,6 +19,7 @@
|
|||||||
#define IPC_DHCP_TIMEOUT (5 * 1000)
|
#define IPC_DHCP_TIMEOUT (5 * 1000)
|
||||||
#define IPC_DHCP_MIN_LEASE 5
|
#define IPC_DHCP_MIN_LEASE 5
|
||||||
#define IPC_DHCP_DEFAULT_LEASE 3600
|
#define IPC_DHCP_DEFAULT_LEASE 3600
|
||||||
|
#define IPC_DHCP_MAX_RESEND_INTERVAL (3 * 1000)
|
||||||
|
|
||||||
#define IPC_MAX_PACKET_QUEUE_LEN 10000
|
#define IPC_MAX_PACKET_QUEUE_LEN 10000
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user