diff options
author | Ermal LUÇI <eri@pfsense.org> | 2014-12-19 19:01:32 +0100 |
---|---|---|
committer | Ermal LUÇI <eri@pfsense.org> | 2014-12-19 19:01:59 +0100 |
commit | 51a2c561230c3317072f2962f05fa2c9eb82b0b2 (patch) | |
tree | 6bce48d834ad57273e767328fc5c6bb8e78aa90f /etc/inc/ipsec.inc | |
parent | 964dcb25044f7364e131b35b31b43002d74bb880 (diff) | |
download | pfsense-51a2c561230c3317072f2962f05fa2c9eb82b0b2.zip pfsense-51a2c561230c3317072f2962f05fa2c9eb82b0b2.tar.gz |
Remove unused function
Diffstat (limited to 'etc/inc/ipsec.inc')
-rw-r--r-- | etc/inc/ipsec.inc | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/etc/inc/ipsec.inc b/etc/inc/ipsec.inc index 7a4469f..15f3c06 100644 --- a/etc/inc/ipsec.inc +++ b/etc/inc/ipsec.inc @@ -363,89 +363,6 @@ function ipsec_phase2_status(&$ipsec_status, &$phase2) { return false; } -/* - * Return IPsec SA details - */ -function ipsec_lookup_ipsec_sa(& $spd,& $sad,$dir,$in_srcip,$in_dstip,$in_srcid,$in_dstid) { - - /* match the phase1/2 to an SP */ - $in_srcip = ipsec_fixup_ip($in_srcip); - $in_dstip = ipsec_fixup_ip($in_dstip); - $in_srcid = ipsec_fixup_ip($in_srcid); - $in_dstid = ipsec_fixup_ip($in_dstid); - - foreach($spd as $sp) { - - /* match direction */ - - if($dir != $sp['dir']) - continue; - - /* match IPs */ - - if($in_srcip != ipsec_fixup_ip($sp['src'])) - continue; - if($in_dstip != ipsec_fixup_ip($sp['dst'])) - continue; - - /* add netbits for address IDs */ - - $sp_srcid = $sp['srcid']; - $sp_dstid = $sp['dstid']; - - if (!strstr($sp_srcid,"/")) { - if (is_ipaddrv4($sp_srcid)) - $sp_srcid .= '/32'; - elseif (is_ipaddrv6($sp_srcid)) - $sp_srcid .= '/128'; - } - if (!strstr($sp_dstid,"/")) { - if (is_ipaddrv4($sp_dstid)) - $sp_dstid .= '/32'; - elseif (is_ipaddrv6($sp_dstid)) - $sp_dstid .= '/128'; - } - - /* match IDs */ - - if($in_srcid != ipsec_fixup_ip($sp_srcid)) - continue; - if($in_dstid != ipsec_fixup_ip($sp_dstid)) - continue; - - /* match the SP to a unique SA by reqid */ - - foreach($sad as $sa) { - - /* match REQIDs */ - - if($sa[reqid] != $sp[reqid]) - continue; - - /* sanitize for NAT-T ports */ - - $sa_srcip = $sa['src']; - $sa_dstip = $sa['dst']; - - if (strstr($sa_srcip,"[")) - $sa_srcip = substr($sa_srcip,0,strcspn($sa_srcip,"[")); - if (strstr($sa_dstip,"[")) - $sa_dstip = substr($sa_dstip,0,strcspn($sa_dstip,"[")); - - /* match IPs */ - - if($in_srcip != ipsec_fixup_ip($sa_srcip)) - continue; - if($in_dstip != ipsec_fixup_ip($sa_dstip)) - continue; - - return $sa; - } - } - - return NULL; -} - function ipsec_smp_dump_status() { global $config, $g, $custom_listtags; |