1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-12-06 10:11:32 +03:00

Ensure DHCP resend interval is not to long

This commit is contained in:
Julian Grasböck
2025-11-26 14:57:58 +01:00
parent d90e89bbbd
commit 137d7f551f
2 changed files with 2 additions and 1 deletions

View File

@ -899,7 +899,7 @@ DHCPV4_DATA *IPCSendDhcpRequest(IPC *ipc, IP *dest_ip, UINT tran_id, DHCP_OPTION
}
// 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
giveup_time = Tick64() + (UINT64)timeout;

View File

@ -19,6 +19,7 @@
#define IPC_DHCP_TIMEOUT (5 * 1000)
#define IPC_DHCP_MIN_LEASE 5
#define IPC_DHCP_DEFAULT_LEASE 3600
#define IPC_DHCP_MAX_RESEND_INTERVAL (3 * 1000)
#define IPC_MAX_PACKET_QUEUE_LEN 10000