From c22f74a78628b681e9a2a2d726fd78b95e32b5fe Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Thu, 4 May 2023 22:24:28 +0200 Subject: [PATCH] VPN/OpenVPN - force the interface down before configuration, should prevent OpenVPN complaining about the device being busy in some cases. A bit of a work-around for https://forum.opnsense.org/index.php?topic=33837.0 --- src/etc/inc/plugins.inc.d/openvpn.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/etc/inc/plugins.inc.d/openvpn.inc b/src/etc/inc/plugins.inc.d/openvpn.inc index d77669b32..6c031fbab 100644 --- a/src/etc/inc/plugins.inc.d/openvpn.inc +++ b/src/etc/inc/plugins.inc.d/openvpn.inc @@ -486,6 +486,7 @@ function openvpn_reconfigure($mode, $settings, $device_only = false) if ($device_only || isset($settings['disable'])) { return; } + mwexecf('/sbin/ifconfig %s down', array($devname)); $proto = strtolower($settings['protocol']); if (substr($settings['protocol'], 0, 3) == "TCP") {