Révision fe12d7ea
Ajouté par Ermal il y a plus de 9 ans
usr/local/www/diag_ipsec_xml.php | ||
---|---|---|
50 | 50 |
|
51 | 51 |
$a_phase2 = &$config['ipsec']['phase2']; |
52 | 52 |
|
53 |
$spd = ipsec_dump_spd(); |
|
54 |
$sad = ipsec_dump_sad(); |
|
53 |
$status = ipsec_smp_dump_status(); |
|
55 | 54 |
|
56 |
if(is_array($a_phase2)) {
|
|
55 |
if (is_array($status['query']) && $status['query']['ikesalist'] && $status['query']['ikesalist']['ikesa'])) {
|
|
57 | 56 |
foreach ($a_phase2 as $ph2ent) { |
58 | 57 |
ipsec_lookup_phase1($ph2ent,$ph1ent); |
59 | 58 |
$tunnel = array(); |
60 | 59 |
if (!isset($ph2ent['disabled']) && !isset($ph1ent['disabled'])) { |
61 |
if(ipsec_phase2_status($spd,$sad,$ph1ent,$ph2ent))
|
|
60 |
if(ipsec_phase1_status($status['query']['ikesalist']['ikesa'], $ph1ent['ikeid']))
|
|
62 | 61 |
$tunnel['state'] = "up"; |
63 | 62 |
elseif(!isset($config['ipsec']['enable'])) |
64 | 63 |
$tunnel['state'] = "disabled"; |
Formats disponibles : Unified diff
Correct the functions for returning tunnel status to use strongswan status reports