Correct displaying of ipsec status for natted networks.

This commit is contained in:
Ermal 2013-01-27 16:13:25 +00:00
parent ab873ccddf
commit bbdb59deca

View File

@ -337,7 +337,7 @@ function ipsec_phase2_status(& $spd,& $sad,& $ph1ent,& $ph2ent) {
if( ipsec_lookup_ipsec_sa($spd,$sad,"out",$loc_ip,$rmt_ip,$loc_id,$rmt_id)) {
if (empty($ph2ent['natlocalid']) && ipsec_lookup_ipsec_sa($spd,$sad,"in",$rmt_ip,$loc_ip,$rmt_id,$loc_id))
return true;
else if (!empty($ph2ent['natlocalid']) && ipsec_lookup_ipsec_sa($spd,$sad,"in",$rmt_ip,$loc_ip,$rmt_id,$natloc_id))
else if (!empty($ph2ent['natlocalid']) && ipsec_lookup_ipsec_sa($spd,$sad,"in",$rmt_ip,$natloc_id,$rmt_id,$natloc_id))
return true;
}