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
This commit is contained in:
Ad Schellevis 2023-05-04 22:24:28 +02:00
parent 0c6486be09
commit c22f74a786

View File

@ -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") {