mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 17:39:53 +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:
parent
0ba7ad392e
commit
939eb3130e
@ -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
|
// Requires account and VLan lists of the CLIENT argument to be already locked
|
||||||
bool CtVLansDown(CLIENT *c)
|
bool CtVLansDown(CLIENT *c)
|
||||||
{
|
{
|
||||||
#ifndef UNIX_LINUX
|
#if defined(UNIX_LINUX) || defined(UNIX_BSD)
|
||||||
return true;
|
|
||||||
#else
|
|
||||||
int i;
|
int i;
|
||||||
LIST *tmpVLanList;
|
LIST *tmpVLanList;
|
||||||
UNIX_VLAN t, *r;
|
UNIX_VLAN t, *r;
|
||||||
@ -6568,6 +6566,8 @@ bool CtVLansDown(CLIENT *c)
|
|||||||
|
|
||||||
ReleaseList(tmpVLanList);
|
ReleaseList(tmpVLanList);
|
||||||
return result;
|
return result;
|
||||||
|
#else
|
||||||
|
return true;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6575,9 +6575,7 @@ bool CtVLansDown(CLIENT *c)
|
|||||||
// Requires VLan list of the CLIENT argument to be already locked
|
// Requires VLan list of the CLIENT argument to be already locked
|
||||||
bool CtVLansUp(CLIENT *c)
|
bool CtVLansUp(CLIENT *c)
|
||||||
{
|
{
|
||||||
#ifndef UNIX_LINUX
|
#if defined(UNIX_LINUX) || defined(UNIX_BSD)
|
||||||
return true;
|
|
||||||
#else
|
|
||||||
int i;
|
int i;
|
||||||
UNIX_VLAN *r;
|
UNIX_VLAN *r;
|
||||||
|
|
||||||
@ -6591,9 +6589,8 @@ bool CtVLansUp(CLIENT *c)
|
|||||||
r = LIST_DATA(c->UnixVLanList, i);
|
r = LIST_DATA(c->UnixVLanList, i);
|
||||||
UnixVLanSetState(r->Name, true);
|
UnixVLanSetState(r->Name, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
#endif
|
#endif
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the account information
|
// Get the account information
|
||||||
|
Loading…
Reference in New Issue
Block a user