From 7b94f91a5f3c99b907db8cad38e99141ea9f8f3a Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Wed, 29 Nov 2023 10:30:50 +0100 Subject: [PATCH] net/wireguard: add a filter reload if something was reconfigured PR: https://forum.opnsense.org/index.php?topic=37248.0 --- net/wireguard/Makefile | 2 +- net/wireguard/pkg-descr | 2 ++ .../src/opnsense/scripts/Wireguard/wg-service-control.php | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/net/wireguard/Makefile b/net/wireguard/Makefile index f6ce57bbd..ab8782ab7 100644 --- a/net/wireguard/Makefile +++ b/net/wireguard/Makefile @@ -1,6 +1,6 @@ PLUGIN_NAME= wireguard PLUGIN_VERSION= 2.5 -PLUGIN_REVISION= 1 +PLUGIN_REVISION= 2 PLUGIN_COMMENT= WireGuard VPN service kernel implementation PLUGIN_DEPENDS= wireguard-kmod PLUGIN_CONFLICTS= wireguard-go diff --git a/net/wireguard/pkg-descr b/net/wireguard/pkg-descr index 57bbbedb3..0d5c694c1 100644 --- a/net/wireguard/pkg-descr +++ b/net/wireguard/pkg-descr @@ -20,6 +20,8 @@ Changelog * Fix error with empty tunnel address in instance (contributed by Monviech) * Switch "setconf" to "syncconf" on (re)configuration +* Fix regression of UUID return in setClientAction() +* Reload the packet filter after reconfiguration * Allow instance selection from peer * Use "syncconf" on newwanip event * CARP event handling improvements 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 249e6f606..0e09a98a6 100755 --- a/net/wireguard/src/opnsense/scripts/Wireguard/wg-service-control.php +++ b/net/wireguard/src/opnsense/scripts/Wireguard/wg-service-control.php @@ -294,5 +294,9 @@ if (isset($opts['h']) || empty($args) || !in_array($args[0], ['start', 'stop', ' } } } + + if (count($server_devs)) { + configd_run('filter reload'); /* XXX required for NAT rules, but needs coalescing */ + } } closelog();