1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-22 09:29:52 +03:00

Cedar/Client: Enable CtVLans{Up,Down} on FreeBSD

The same trick also works on FreeBSD. There's no reason to limit it to
Linux.
This commit is contained in:
Koichiro IWAO 2023-05-31 16:40:34 +09:00
parent 0ba7ad392e
commit 939eb3130e

View File

@ -6524,9 +6524,7 @@ bool CtConnect(CLIENT *c, RPC_CLIENT_CONNECT *connect)
// Requires account and VLan lists of the CLIENT argument to be already locked
bool CtVLansDown(CLIENT *c)
{
#ifndef UNIX_LINUX
return true;
#else
#if defined(UNIX_LINUX) || defined(UNIX_BSD)
int i;
LIST *tmpVLanList;
UNIX_VLAN t, *r;
@ -6568,6 +6566,8 @@ bool CtVLansDown(CLIENT *c)
ReleaseList(tmpVLanList);
return result;
#else
return true;
#endif
}
@ -6575,9 +6575,7 @@ bool CtVLansDown(CLIENT *c)
// Requires VLan list of the CLIENT argument to be already locked
bool CtVLansUp(CLIENT *c)
{
#ifndef UNIX_LINUX
return true;
#else
#if defined(UNIX_LINUX) || defined(UNIX_BSD)
int i;
UNIX_VLAN *r;
@ -6591,9 +6589,8 @@ bool CtVLansUp(CLIENT *c)
r = LIST_DATA(c->UnixVLanList, i);
UnixVLanSetState(r->Name, true);
}
return true;
#endif
return true;
}
// Get the account information