Revision 694d368d
Added by Ermal LUÇI over 10 years ago
etc/inc/ipsec.inc | ||
---|---|---|
346 | 346 |
*/ |
347 | 347 |
function ipsec_phase1_status($ipsec_status, $ikeid) { |
348 | 348 |
|
349 |
foreach ($ipsec_status as $ike) { |
|
350 |
if ($ike['id'] != $ikeid) |
|
349 |
if (!is_array($ipsec_status['query'])) |
|
350 |
return false; |
|
351 |
if (!is_array($ipsec_status['query']['ikesalist'])) |
|
352 |
return false; |
|
353 |
if (!is_array($ipsec_status['query']['ikesalist']['ikesa'])) |
|
354 |
return false; |
|
355 |
|
|
356 |
foreach ($ipsec_status['query']['ikesalist']['ikesa'] as $ike) { |
|
357 |
if ($ike['id'] != "con{$ikeid}") |
|
351 | 358 |
continue; |
352 | 359 |
if ($ike['status'] == 'established') |
353 | 360 |
return true; |
Also available in: Unified diff
Make phase1_status function wok whnever there is a smp dump. This should unbreak Ticket #3955