mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-07-12 02:34:59 +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
|
||||
|
Reference in New Issue
Block a user