Permalink
Browse files

Merge pull request #482 from mdima/master

Fixes IPSec Status for natted tunnels
  • Loading branch information...
2 parents d632dd5 + 1bad102 commit e46adb09139f38295e0d249b41bb253be2b6477d Chris Buechler committed Mar 15, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 etc/inc/ipsec.inc
View
@@ -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;
}

0 comments on commit e46adb0

Please sign in to comment.