Commit a000c8e0 authored by Franco Fichtner's avatar Franco Fichtner

ipsec: fix a crash report

parent 74ca8331
...@@ -1291,7 +1291,7 @@ EOD; ...@@ -1291,7 +1291,7 @@ EOD;
function ipsec_configured_on_interface($interface) function ipsec_configured_on_interface($interface)
{ {
global $config; global $config;
if (!empty($config['ipsec']['phase1'][0])) { if (isset($config['ipsec']['phase1'])) {
foreach ($config['ipsec']['phase1'] as $phase1) { foreach ($config['ipsec']['phase1'] as $phase1) {
if (!isset($phase1['disabled']) && $phase1['interface'] == $interface) { if (!isset($phase1['disabled']) && $phase1['interface'] == $interface) {
return true; return true;
......
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