mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2026-01-22 19:30:14 +03:00
Compare commits
7 Commits
dependabot
...
204ab85e51
| Author | SHA1 | Date | |
|---|---|---|---|
| 204ab85e51 | |||
| 2628c562be | |||
| e9f7089c8b | |||
| 9be944a9b2 | |||
| 137d7f551f | |||
| d90e89bbbd | |||
| 173df872b8 |
@ -630,6 +630,7 @@ void DataToHubOptionStruct(HUB_OPTION *o, RPC_ADMIN_OPTION *ao)
|
||||
GetHubAdminOptionDataAndSet(ao, "UseHubNameAsDhcpUserClassOption", o->UseHubNameAsDhcpUserClassOption);
|
||||
GetHubAdminOptionDataAndSet(ao, "UseHubNameAsRadiusNasId", o->UseHubNameAsRadiusNasId);
|
||||
GetHubAdminOptionDataAndSet(ao, "AllowEapMatchUserByCert", o->AllowEapMatchUserByCert);
|
||||
GetHubAdminOptionDataAndSet(ao, "DhcpDiscoverTimeoutMs", o->DhcpDiscoverTimeoutMs);
|
||||
}
|
||||
|
||||
// Convert the contents of the HUB_OPTION to data
|
||||
@ -705,6 +706,7 @@ void HubOptionStructToData(RPC_ADMIN_OPTION *ao, HUB_OPTION *o, char *hub_name)
|
||||
Add(aol, NewAdminOption("UseHubNameAsDhcpUserClassOption", o->UseHubNameAsDhcpUserClassOption));
|
||||
Add(aol, NewAdminOption("UseHubNameAsRadiusNasId", o->UseHubNameAsRadiusNasId));
|
||||
Add(aol, NewAdminOption("AllowEapMatchUserByCert", o->AllowEapMatchUserByCert));
|
||||
Add(aol, NewAdminOption("DhcpDiscoverTimeoutMs", o->DhcpDiscoverTimeoutMs));
|
||||
|
||||
Zero(ao, sizeof(RPC_ADMIN_OPTION));
|
||||
|
||||
|
||||
@ -30,6 +30,9 @@
|
||||
// Default flooding queue length
|
||||
#define DEFAULT_FLOODING_QUEUE_LENGTH (32 * 1024 * 1024)
|
||||
|
||||
// Default DHCP Discover Timeout
|
||||
#define DEFAULT_DHCP_DISCOVER_TIMEOUT (5 * 1000)
|
||||
|
||||
// SoftEther link control packet
|
||||
struct SE_LINK
|
||||
{
|
||||
@ -183,6 +186,7 @@ struct HUB_OPTION
|
||||
bool UseHubNameAsDhcpUserClassOption; // Add HubName to DHCP request as User-Class option
|
||||
bool UseHubNameAsRadiusNasId; // Add HubName to Radius request as NAS-Identifier attrioption
|
||||
bool AllowEapMatchUserByCert; // Allow matching EAP Identity with user certificate CNs
|
||||
UINT DhcpDiscoverTimeoutMs; // Timeout to wait for DHCP server response on DISCOVER request
|
||||
};
|
||||
|
||||
// MAC table entry
|
||||
|
||||
@ -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,8 @@ 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);
|
||||
UINT discoverTimeout = ipc->DhcpDiscoverTimeoutMs > 0 ? ipc->DhcpDiscoverTimeoutMs : DEFAULT_DHCP_DISCOVER_TIMEOUT;
|
||||
d = IPCSendDhcpRequest(ipc, NULL, tran_id, &req, DHCP_OFFER, discoverTimeout, discon_poll_tube);
|
||||
if (d == NULL)
|
||||
{
|
||||
return false;
|
||||
@ -896,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;
|
||||
|
||||
@ -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
|
||||
|
||||
@ -149,6 +150,7 @@ struct IPC
|
||||
SHARED_BUFFER *IpcSessionSharedBuffer; // A shared buffer between IPC and Session
|
||||
IPC_SESSION_SHARED_BUFFER_DATA *IpcSessionShared; // Shared data between IPC and Session
|
||||
UINT Layer;
|
||||
UINT DhcpDiscoverTimeoutMs; // Timeut to wait for DHCP server response on DISCOVER request
|
||||
|
||||
// IPv6 stuff
|
||||
QUEUE *IPv6ReceivedQueue; // IPv6 reception queue
|
||||
|
||||
@ -2337,6 +2337,7 @@ void SiSetDefaultHubOption(HUB_OPTION *o)
|
||||
o->AccessListIncludeFileCacheLifetime = ACCESS_LIST_INCLUDE_FILE_CACHE_LIFETIME;
|
||||
o->RemoveDefGwOnDhcpForLocalhost = true;
|
||||
o->FloodingSendQueueBufferQuota = DEFAULT_FLOODING_QUEUE_LENGTH;
|
||||
o->DhcpDiscoverTimeoutMs = DEFAULT_DHCP_DISCOVER_TIMEOUT;
|
||||
}
|
||||
|
||||
// Create a default virtual HUB
|
||||
@ -3942,6 +3943,11 @@ void SiLoadHubOptionCfg(FOLDER *f, HUB_OPTION *o)
|
||||
o->UseHubNameAsDhcpUserClassOption = CfgGetBool(f, "UseHubNameAsDhcpUserClassOption");
|
||||
o->UseHubNameAsRadiusNasId = CfgGetBool(f, "UseHubNameAsRadiusNasId");
|
||||
o->AllowEapMatchUserByCert = CfgGetBool(f, "AllowEapMatchUserByCert");
|
||||
o->DhcpDiscoverTimeoutMs = CfgGetInt(f, "DhcpDiscoverTimeoutMs");
|
||||
if (o->DhcpDiscoverTimeoutMs == 0)
|
||||
{
|
||||
o->DhcpDiscoverTimeoutMs = DEFAULT_DHCP_DISCOVER_TIMEOUT;
|
||||
}
|
||||
|
||||
// Enabled by default
|
||||
if (CfgIsItem(f, "ManageOnlyPrivateIP"))
|
||||
@ -4048,6 +4054,7 @@ void SiWriteHubOptionCfg(FOLDER *f, HUB_OPTION *o)
|
||||
CfgAddBool(f, "UseHubNameAsDhcpUserClassOption", o->UseHubNameAsDhcpUserClassOption);
|
||||
CfgAddBool(f, "UseHubNameAsRadiusNasId", o->UseHubNameAsRadiusNasId);
|
||||
CfgAddBool(f, "AllowEapMatchUserByCert", o->AllowEapMatchUserByCert);
|
||||
CfgAddInt(f, "DhcpDiscoverTimeoutMs", o->DhcpDiscoverTimeoutMs);
|
||||
}
|
||||
|
||||
// Write the user
|
||||
@ -7533,6 +7540,11 @@ void SiCalledUpdateHub(SERVER *s, PACK *p)
|
||||
o.UseHubNameAsDhcpUserClassOption = PackGetBool(p, "UseHubNameAsDhcpUserClassOption");
|
||||
o.UseHubNameAsRadiusNasId = PackGetBool(p, "UseHubNameAsRadiusNasId");
|
||||
o.AllowEapMatchUserByCert = PackGetBool(p, "AllowEapMatchUserByCert");
|
||||
o.DhcpDiscoverTimeoutMs = PackGetInt(p, "DhcpDiscoverTimeoutMs");
|
||||
if (o.DhcpDiscoverTimeoutMs == 0)
|
||||
{
|
||||
o.DhcpDiscoverTimeoutMs = DEFAULT_DHCP_DISCOVER_TIMEOUT;
|
||||
}
|
||||
|
||||
save_packet_log = PackGetInt(p, "SavePacketLog");
|
||||
packet_log_switch_type = PackGetInt(p, "PacketLogSwitchType");
|
||||
@ -9368,6 +9380,7 @@ void SiPackAddCreateHub(PACK *p, HUB *h)
|
||||
PackAddBool(p, "UseHubNameAsDhcpUserClassOption", h->Option->UseHubNameAsDhcpUserClassOption);
|
||||
PackAddBool(p, "UseHubNameAsRadiusNasId", h->Option->UseHubNameAsRadiusNasId);
|
||||
PackAddBool(p, "AllowEapMatchUserByCert", h->Option->AllowEapMatchUserByCert);
|
||||
PackAddInt(p, "DhcpDiscoverTimeoutMs", h->Option->DhcpDiscoverTimeoutMs);
|
||||
|
||||
SiAccessListToPack(p, h->AccessList);
|
||||
|
||||
|
||||
2
src/Mayaqua/3rdparty/liboqs
vendored
2
src/Mayaqua/3rdparty/liboqs
vendored
Submodule src/Mayaqua/3rdparty/liboqs updated: f4b96220e4...94b421ebb8
2
src/Mayaqua/3rdparty/oqs-provider
vendored
2
src/Mayaqua/3rdparty/oqs-provider
vendored
Submodule src/Mayaqua/3rdparty/oqs-provider updated: ec1e8431f9...f076e91faa
@ -31,6 +31,25 @@ if(OQS_ENABLE)
|
||||
set(OQS_PROVIDER_BUILD_STATIC ON CACHE BOOL "Build a static library instead of a shared library") # Build oqsprovider as a static library (defaults to shared)
|
||||
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/src/Mayaqua/3rdparty/")
|
||||
|
||||
# Disable all other KEM families
|
||||
set(OQS_ENABLE_KEM_FRODOKEM OFF)
|
||||
set(OQS_ENABLE_KEM_NTRUPRIME OFF)
|
||||
set(OQS_ENABLE_KEM_NTRU OFF)
|
||||
set(OQS_ENABLE_KEM_CLASSIC_MCELIECE OFF)
|
||||
set(OQS_ENABLE_KEM_HQC OFF)
|
||||
set(OQS_ENABLE_KEM_BIKE OFF)
|
||||
|
||||
# Disable all SIG families
|
||||
set(OQS_ENABLE_SIG_ML_DSA OFF)
|
||||
set(OQS_ENABLE_SIG_FALCON OFF)
|
||||
set(OQS_ENABLE_SIG_DILITHIUM OFF)
|
||||
set(OQS_ENABLE_SIG_SPHINCS OFF)
|
||||
set(OQS_ENABLE_SIG_MAYO OFF)
|
||||
set(OQS_ENABLE_SIG_CROSS OFF)
|
||||
set(OQS_ENABLE_SIG_UOV OFF)
|
||||
set(OQS_ENABLE_SIG_SNOVA OFF)
|
||||
set(OQS_ENABLE_SIG_SLH_DSA OFF)
|
||||
|
||||
add_subdirectory(3rdparty/liboqs)
|
||||
add_subdirectory(3rdparty/oqs-provider)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user