1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2026-04-19 13:31:17 +03:00

Add radius retry timeout in configuration

This commit is contained in:
Siddharth Narayan
2025-12-21 21:07:55 -05:00
parent d5c2e33175
commit 304364719c
6 changed files with 40 additions and 19 deletions
+8 -1
View File
@@ -4855,6 +4855,7 @@ void SiWriteHubCfg(FOLDER *f, HUB *h)
}
CfgAddInt(f, "RadiusServerPort", h->RadiusServerPort);
CfgAddInt(f, "RadiusRetryInterval", h->RadiusRetryInterval);
CfgAddInt(f, "RadiusRetryTimeout", h->RadiusRetryTimeout);
CfgAddStr(f, "RadiusSuffixFilter", h->RadiusSuffixFilter);
CfgAddStr(f, "RadiusRealm", h->RadiusRealm);
@@ -5020,9 +5021,11 @@ void SiLoadHubCfg(SERVER *s, FOLDER *f, char *name)
BUF *secret;
UINT port;
UINT interval;
UINT timeout;
port = CfgGetInt(f, "RadiusServerPort");
interval = CfgGetInt(f, "RadiusRetryInterval");
timeout = CfgGetInt(f, "RadiusRetryTimeout");
CfgGetStr(f, "RadiusSuffixFilter", h->RadiusSuffixFilter, sizeof(h->RadiusSuffixFilter));
CfgGetStr(f, "RadiusRealm", h->RadiusRealm, sizeof(h->RadiusRealm));
@@ -5035,6 +5038,10 @@ void SiLoadHubCfg(SERVER *s, FOLDER *f, char *name)
interval = RADIUS_RETRY_INTERVAL;
}
if (timeout == 0) {
timeout = RADIUS_RETRY_TIMEOUT;
}
if (port != 0 && CfgGetStr(f, "RadiusServerName", name, sizeof(name)))
{
secret = CfgGetBuf(f, "RadiusSecret");
@@ -5048,7 +5055,7 @@ void SiLoadHubCfg(SERVER *s, FOLDER *f, char *name)
}
secret_str[sizeof(secret_str) - 1] = 0;
//SetRadiusServer(h, name, port, secret_str);
SetRadiusServerEx(h, name, port, secret_str, interval);
SetRadiusServerEx(h, name, port, secret_str, interval, timeout);
FreeBuf(secret);
}
}