mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2026-03-06 16:30:10 +03:00
Remove obsolete hardcoded build number checks
The open-source project began with version 1.00, build 9022. With the exception of an informative message fallback for builds older than 9428 (2014), all checks were for closed-source builds.
This commit is contained in:
@ -260,26 +260,6 @@ CAPSLIST *ScGetCapsEx(RPC *rpc)
|
||||
AddCapsBool(t, "b_support_config_log", info.ServerType != SERVER_TYPE_FARM_MEMBER);
|
||||
AddCapsBool(t, "b_support_autodelete", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Success getting Caps
|
||||
if (info.ServerBuildInt <= 4350)
|
||||
{
|
||||
if (is_bridge == false)
|
||||
{
|
||||
// b_support_cluster should be true for build 4300 or earlier
|
||||
CAPS *caps = GetCaps(t, "b_support_cluster");
|
||||
if (caps == NULL)
|
||||
{
|
||||
AddCapsBool(t, "b_support_cluster", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
caps->Value = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (true)
|
||||
{
|
||||
@ -6550,8 +6530,6 @@ UINT StSetAccessList(ADMIN *a, RPC_ENUM_ACCESS_LIST *t)
|
||||
UINT i;
|
||||
bool no_jitter = false;
|
||||
bool no_include = false;
|
||||
UINT ret = ERR_NO_ERROR;
|
||||
|
||||
|
||||
NO_SUPPORT_FOR_BRIDGE;
|
||||
if (s->ServerType == SERVER_TYPE_FARM_MEMBER)
|
||||
@ -6595,59 +6573,19 @@ UINT StSetAccessList(ADMIN *a, RPC_ENUM_ACCESS_LIST *t)
|
||||
|
||||
LockList(h->AccessList);
|
||||
{
|
||||
UINT i;
|
||||
|
||||
if (a->ClientBuild != 0)
|
||||
// Delete whole access list
|
||||
for (i = 0; i < LIST_NUM(h->AccessList); ++i)
|
||||
{
|
||||
// Confirm whether the access list of form which cannot handle by the old client already exists
|
||||
if (a->ClientBuild < 6560)
|
||||
{
|
||||
for (i = 0;i < LIST_NUM(h->AccessList);i++)
|
||||
{
|
||||
ACCESS *access = LIST_DATA(h->AccessList, i);
|
||||
if (access->IsIPv6 ||
|
||||
access->Jitter != 0 || access->Loss != 0 || access->Delay != 0)
|
||||
{
|
||||
ret = ERR_VERSION_INVALID;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (a->ClientBuild < 8234)
|
||||
{
|
||||
for (i = 0;i < LIST_NUM(h->AccessList);i++)
|
||||
{
|
||||
ACCESS *access = LIST_DATA(h->AccessList, i);
|
||||
|
||||
if (IsEmptyStr(access->RedirectUrl) == false)
|
||||
{
|
||||
ret = ERR_VERSION_INVALID;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
ACCESS *access = LIST_DATA(h->AccessList, i);
|
||||
Free(access);
|
||||
}
|
||||
|
||||
if (ret == ERR_NO_ERROR)
|
||||
{
|
||||
// Delete whole access list
|
||||
for (i = 0;i < LIST_NUM(h->AccessList);i++)
|
||||
{
|
||||
ACCESS *access = LIST_DATA(h->AccessList, i);
|
||||
Free(access);
|
||||
}
|
||||
DeleteAll(h->AccessList);
|
||||
|
||||
DeleteAll(h->AccessList);
|
||||
}
|
||||
}
|
||||
|
||||
if (ret == ERR_NO_ERROR)
|
||||
{
|
||||
ALog(a, h, "LA_SET_ACCESS_LIST", t->NumAccess);
|
||||
|
||||
// Add whole access list
|
||||
for (i = 0;i < t->NumAccess;i++)
|
||||
for (i = 0; i < t->NumAccess; ++i)
|
||||
{
|
||||
ACCESS *a = &t->Accesses[i];
|
||||
|
||||
@ -6686,14 +6624,10 @@ UINT StSetAccessList(ADMIN *a, RPC_ENUM_ACCESS_LIST *t)
|
||||
h->CurrentVersion++;
|
||||
SiHubUpdateProc(h);
|
||||
}
|
||||
else
|
||||
{
|
||||
UnlockList(h->AccessList);
|
||||
}
|
||||
|
||||
ReleaseHub(h);
|
||||
|
||||
return ret;
|
||||
return ERR_NO_ERROR;
|
||||
}
|
||||
|
||||
// Add access list entry
|
||||
|
||||
@ -11844,7 +11844,6 @@ bool LoginCM()
|
||||
// Try to login with an empty password first
|
||||
bool bad_pass, no_remote;
|
||||
wchar_t server_name[MAX_SIZE];
|
||||
RPC_CLIENT_VERSION a;
|
||||
|
||||
RETRY:
|
||||
if (cm->server_name != NULL)
|
||||
@ -11896,13 +11895,8 @@ RETRY:
|
||||
}
|
||||
}
|
||||
|
||||
Zero(&a, sizeof(a));
|
||||
CcGetClientVersion(cm->Client, &a);
|
||||
if (a.ClientBuildInt >= 5192)
|
||||
{
|
||||
cm->CmSettingSupported = true;
|
||||
cm->CmEasyModeSupported = true;
|
||||
}
|
||||
cm->CmSettingSupported = true;
|
||||
cm->CmEasyModeSupported = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2385,23 +2385,6 @@ bool ServerAccept(CONNECTION *c)
|
||||
goto CLEANUP;
|
||||
}
|
||||
|
||||
if ((policy->NoSavePassword) || (policy->AutoDisconnect != 0))
|
||||
{
|
||||
if (c->ClientBuild < 6560 && InStrEx(c->ClientStr, "client", false))
|
||||
{
|
||||
// If NoSavePassword policy is specified,
|
||||
// only supported client can connect
|
||||
HLog(hub, "LH_CLIENT_VERSION_OLD", c->Name, c->ClientBuild, 6560);
|
||||
|
||||
Unlock(hub->lock);
|
||||
ReleaseHub(hub);
|
||||
c->Err = ERR_VERSION_INVALID;
|
||||
error_detail = "ERR_VERSION_INVALID";
|
||||
Free(policy);
|
||||
goto CLEANUP;
|
||||
}
|
||||
}
|
||||
|
||||
if (user_expires != 0 && user_expires <= SystemTime64())
|
||||
{
|
||||
// User expired
|
||||
@ -3217,7 +3200,7 @@ bool ServerAccept(CONNECTION *c)
|
||||
#endif // OS_WIN32
|
||||
|
||||
tmp2 = ZeroMalloc(tmp2_size);
|
||||
UniFormat(tmp2, tmp2_size, _UU(c->ClientBuild >= 9428 ? "NATT_MSG" : "NATT_MSG2"), local_name);
|
||||
UniFormat(tmp2, tmp2_size, _UU("NATT_MSG"), local_name);
|
||||
|
||||
UniStrCat(tmp, tmpsize, tmp2);
|
||||
|
||||
|
||||
@ -9331,12 +9331,6 @@ void SmSessionDlgUpdate(HWND hWnd, SM_HUB *s)
|
||||
}
|
||||
}
|
||||
|
||||
if (s->p->ServerInfo.ServerBuildInt < 2844)
|
||||
{
|
||||
// Old version doesn't support for remote management of the sessions
|
||||
ok2 = ok;
|
||||
}
|
||||
|
||||
SetEnable(hWnd, IDOK, ok2);
|
||||
SetEnable(hWnd, B_DISCONNECT, ok2);
|
||||
SetEnable(hWnd, B_SESSION_IP_TABLE, ok);
|
||||
|
||||
Reference in New Issue
Block a user