Commit 8c32e798 authored by Franco Fichtner's avatar Franco Fichtner

openvpn/ipsec: properly handle interface deletion artefact

The array was still there, and even though empty evaluated as
being filled with data that requires an interface.
parent 47c3fee7
...@@ -64,8 +64,7 @@ function if_ipsec_interfaces() ...@@ -64,8 +64,7 @@ function if_ipsec_interfaces()
$interfaces = array(); $interfaces = array();
/* add ipsec interfaces */ if (isset($config['ipsec']['phase1']) && count($config['ipsec']['phase1'])) {
if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable'])) {
$oic = array("enable" => true); $oic = array("enable" => true);
$oic['if'] = 'enc0'; $oic['if'] = 'enc0';
$oic['descr'] = 'IPsec'; $oic['descr'] = 'IPsec';
......
...@@ -73,8 +73,8 @@ function if_openvpn_interfaces() ...@@ -73,8 +73,8 @@ function if_openvpn_interfaces()
$interfaces = array(); $interfaces = array();
/* add openvpn interfaces */ if ((isset($config['openvpn']['openvpn-server']) && count($config['openvpn']['openvpn-server'])) ||
if (isset($config['openvpn']['openvpn-server']) || isset($config['openvpn']['openvpn-client'])) { (isset($config['openvpn']['openvpn-client']) && count($config['openvpn']['openvpn-client']))) {
$oic = array("enable" => true); $oic = array("enable" => true);
$oic['if'] = "openvpn"; $oic['if'] = "openvpn";
$oic['descr'] = 'OpenVPN'; $oic['descr'] = 'OpenVPN';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment