Commit ca3f686d authored by Franco Fichtner's avatar Franco Fichtner

ipsec: only plug when enabled and has phase 1 entries

Spotted by: @adschellevis
parent 8c32e798
......@@ -64,7 +64,8 @@ function if_ipsec_interfaces()
$interfaces = array();
if (isset($config['ipsec']['phase1']) && count($config['ipsec']['phase1'])) {
if ((isset($config['ipsec']['phase1']) && count($config['ipsec']['phase1'])) &&
(isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable']))) {
$oic = array("enable" => true);
$oic['if'] = 'enc0';
$oic['descr'] = 'IPsec';
......
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