1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-12-19 00:21:31 +03:00

Config value for dhcp discover timeout

This commit is contained in:
Julian Grasböck
2025-11-26 13:56:29 +01:00
parent acbc514b87
commit 173df872b8
5 changed files with 23 additions and 1 deletions

View File

@ -493,12 +493,14 @@ IPC *NewIPC(CEDAR *cedar, char *client_name, char *postfix, char *hubname, char
{
UINTToIP(&ipc->DefaultGateway, hub->Option->DefaultGateway);
UINTToIP(&ipc->SubnetMask, hub->Option->DefaultSubnet);
ipc->DhcpDiscoverTimeoutMs = hub->Option->DhcpDiscoverTimeoutMs;
GetBroadcastAddress4(&ipc->BroadcastAddress, &ipc->DefaultGateway, &ipc->SubnetMask);
}
else
{
ZeroIP4(&ipc->DefaultGateway);
ZeroIP4(&ipc->SubnetMask);
ipc->DhcpDiscoverTimeoutMs = DEFAULT_DHCP_DISCOVER_TIMEOUT;
ZeroIP4(&ipc->BroadcastAddress);
}
@ -793,7 +795,7 @@ bool IPCDhcpAllocateIP(IPC *ipc, DHCP_OPTION_LIST *opt, TUBE *discon_poll_tube)
StrCpy(req.Hostname, sizeof(req.Hostname), ipc->ClientHostname);
IPCDhcpSetConditionalUserClass(ipc, &req);
d = IPCSendDhcpRequest(ipc, NULL, tran_id, &req, DHCP_OFFER, IPC_DHCP_TIMEOUT, discon_poll_tube);
d = IPCSendDhcpRequest(ipc, NULL, tran_id, &req, DHCP_OFFER, ipc->DhcpDiscoverTimeoutMs, discon_poll_tube);
if (d == NULL)
{
return false;