From 7a7b5a5c9ce7144b567684a91ec24b4945e4aa52 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Tue, 7 Nov 2023 18:24:51 +0100 Subject: [PATCH] net/wireguard - replace setconf with syncconf in service control for more fluent reloading. (https://github.com/opnsense/plugins/pull/3358) --- net/wireguard/Makefile | 1 + .../src/opnsense/scripts/Wireguard/wg-service-control.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/net/wireguard/Makefile b/net/wireguard/Makefile index f77b3b923..f6ce57bbd 100644 --- a/net/wireguard/Makefile +++ b/net/wireguard/Makefile @@ -1,5 +1,6 @@ PLUGIN_NAME= wireguard PLUGIN_VERSION= 2.5 +PLUGIN_REVISION= 1 PLUGIN_COMMENT= WireGuard VPN service kernel implementation PLUGIN_DEPENDS= wireguard-kmod PLUGIN_CONFLICTS= wireguard-go diff --git a/net/wireguard/src/opnsense/scripts/Wireguard/wg-service-control.php b/net/wireguard/src/opnsense/scripts/Wireguard/wg-service-control.php index 2ac781a96..249e6f606 100755 --- a/net/wireguard/src/opnsense/scripts/Wireguard/wg-service-control.php +++ b/net/wireguard/src/opnsense/scripts/Wireguard/wg-service-control.php @@ -67,7 +67,7 @@ function wg_start($server, $fhandle, $ifcfgflag = 'up') mwexecf('/sbin/ifconfig wg create name %s', [$server->interface]); mwexecf('/sbin/ifconfig %s group wireguard', [$server->interface]); } - mwexecf('/usr/bin/wg setconf %s %s', [$server->interface, $server->cnfFilename]); + mwexecf('/usr/bin/wg syncconf %s %s', [$server->interface, $server->cnfFilename]); /* The tunneladdress can be empty, so array_filter without callback filters empty strings out. */ foreach (array_filter(explode(',', (string)$server->tunneladdress)) as $alias) {