Skip to content

Commit

Permalink
VPN/OpenVPN - force the interface down before configuration, should p…
Browse files Browse the repository at this point in the history
…revent 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
  • Loading branch information
AdSchellevis committed May 4, 2023
1 parent 0c6486b commit c22f74a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/etc/inc/plugins.inc.d/openvpn.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down

0 comments on commit c22f74a

Please sign in to comment.