Make phase1_status function wok whnever there is a smp dump. This should unbreak Ticket #3955
This commit is contained in:
parent
c7f5b55a28
commit
694d368d81
|
@ -346,8 +346,15 @@ function ipsec_lookup_phase1(& $ph2ent,& $ph1ent) {
|
|||
*/
|
||||
function ipsec_phase1_status($ipsec_status, $ikeid) {
|
||||
|
||||
foreach ($ipsec_status as $ike) {
|
||||
if ($ike['id'] != $ikeid)
|
||||
if (!is_array($ipsec_status['query']))
|
||||
return false;
|
||||
if (!is_array($ipsec_status['query']['ikesalist']))
|
||||
return false;
|
||||
if (!is_array($ipsec_status['query']['ikesalist']['ikesa']))
|
||||
return false;
|
||||
|
||||
foreach ($ipsec_status['query']['ikesalist']['ikesa'] as $ike) {
|
||||
if ($ike['id'] != "con{$ikeid}")
|
||||
continue;
|
||||
if ($ike['status'] == 'established')
|
||||
return true;
|
||||
|
|
Reference in New Issue