diff options
-rw-r--r-- | etc/inc/ipsec.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/inc/ipsec.inc b/etc/inc/ipsec.inc index 9ad3e4a..2d5c1a7 100644 --- a/etc/inc/ipsec.inc +++ b/etc/inc/ipsec.inc @@ -354,7 +354,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,$natloc_id,$rmt_id,$natloc_id)) + else if (!empty($ph2ent['natlocalid']) && ipsec_lookup_ipsec_sa($spd,$sad,"out",$loc_ip,$rmt_ip,$loc_id,$rmt_id)) return true; } |