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

ipsec: work around widget issues; closes #1552

In the end, it's better to check if the key exists, although it
always should, that's what the key is for....

(cherry picked from commit a60db3ce)
parent 75596113
...@@ -61,8 +61,14 @@ if (isset($config['ipsec']['phase1'])) { ...@@ -61,8 +61,14 @@ if (isset($config['ipsec']['phase1'])) {
} }
foreach ($status_value['sas'] as $sas_key => $sas_value) { foreach ($status_value['sas'] as $sas_key => $sas_value) {
foreach ($sas_value['child-sas'] as $child_sa_key => $child_sa_value) { foreach ($sas_value['child-sas'] as $child_sa_key => $child_sa_value) {
$ipsec_tunnels[$child_sa_key]['active'] = true; if (!isset($ipsec_tunnels[$child_sa_key])) {
$activetunnels++; /* XXX bug on strongSwan 5.5.2 appends -3 and -4 here? */
$child_sa_key = preg_replace('/-.*$/', '', $child_sa_key);
}
if (isset($ipsec_tunnels[$child_sa_key])) {
$ipsec_tunnels[$child_sa_key]['active'] = true;
$activetunnels++;
}
} }
} }
} }
......
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