Repaired get_ipsecifnum. Working with pre 2.6 and 2.6 pfsense

This commit is contained in:
Lukas Macura 2022-04-21 11:39:35 +02:00
parent 67a521fa7b
commit dcd5121571
2 changed files with 2440 additions and 6 deletions

View File

@ -665,12 +665,16 @@ function pfz_ipsec_status($ikeid,$reqid=-1,$valuekey='state'){
$a_phase1 = &$config['ipsec']['phase1'];
$conmap = array();
foreach ($a_phase1 as $ph1ent) {
if (get_ipsecifnum($ph1ent['ikeid'], 0)) {
$cname = "con" . get_ipsecifnum($ph1ent['ikeid'], 0);
} else {
$cname = "con{$ph1ent['ikeid']}00000";
}
$conmap[$cname] = $ph1ent['ikeid'];
if (function_exists('get_ipsecifnum')) {
if (get_ipsecifnum($ph1ent['ikeid'], 0)) {
$cname = "con" . get_ipsecifnum($ph1ent['ikeid'], 0);
} else {
$cname = "con{$ph1ent['ikeid']}00000";
}
$conmap[$cname] = $ph1ent['ikeid'];
} else{
$cname = ipsec_conid($ph1ent);
}
}
$status = ipsec_list_sa();

File diff suppressed because it is too large Load Diff