diff options
author | Ermal LUÇI <eri@pfsense.org> | 2014-12-22 17:36:38 +0100 |
---|---|---|
committer | Ermal LUÇI <eri@pfsense.org> | 2014-12-22 17:36:49 +0100 |
commit | 0314cbf47eac522666eaf8f53f9462be931cf293 (patch) | |
tree | b28ec3a3cd440a4045399e61dd06ec7b4689d189 /usr/local/www/diag_ipsec.php | |
parent | fe2e680bdbe3669e2ed71d22474608f3b3612317 (diff) | |
download | pfsense-0314cbf47eac522666eaf8f53f9462be931cf293.zip pfsense-0314cbf47eac522666eaf8f53f9462be931cf293.tar.gz |
Correct display of tunnel status on ikev1 with multiple phase2
Diffstat (limited to 'usr/local/www/diag_ipsec.php')
-rw-r--r-- | usr/local/www/diag_ipsec.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr/local/www/diag_ipsec.php b/usr/local/www/diag_ipsec.php index 827837a..e6347c5 100644 --- a/usr/local/www/diag_ipsec.php +++ b/usr/local/www/diag_ipsec.php @@ -134,7 +134,11 @@ $status = ipsec_smp_dump_status(); if (is_array($status['query']) && is_array($status['query']['ikesalist']) && is_array($status['query']['ikesalist']['ikesa'])): foreach ($status['query']['ikesalist']['ikesa'] as $ikeid => $ikesa): $con_id = substr($ikesa['peerconfig'], 3); - $ipsecconnected[$con_id] = $con_id; + if ($ikesa['version'] == 1) { + $ph1idx = substr($con_id, 0, strrpos(substr($con_id, 0, -1), '00')); + $ipsecconnected[$ph1idx] = $ph1idx; + } else + $ipsecconnected[$con_id] = $con_id; if (ipsec_phase1_status($status['query']['ikesalist']['ikesa'], $ikesa['id'])) $icon = "pass"; |