From 939eb3130ea796b3b96a6c74919900990250da96 Mon Sep 17 00:00:00 2001 From: Koichiro IWAO Date: Wed, 31 May 2023 16:40:34 +0900 Subject: [PATCH] Cedar/Client: Enable CtVLans{Up,Down} on FreeBSD The same trick also works on FreeBSD. There's no reason to limit it to Linux. --- src/Cedar/Client.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/Cedar/Client.c b/src/Cedar/Client.c index 46b4f1fa..a4175a3c 100644 --- a/src/Cedar/Client.c +++ b/src/Cedar/Client.c @@ -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