summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2014-12-22 17:20:44 +0100
committerErmal LUÇI <eri@pfsense.org>2014-12-22 17:20:53 +0100
commit483c3b5b43bf32815c29c91d653b5b9ba01374ad (patch)
tree3fb6025b628011d10760542894a5cc0f8ec45eda /etc
parent7a8ea3ee7af3d5798c78dfe65d4cfe21bce0fdbb (diff)
downloadpfsense-483c3b5b43bf32815c29c91d653b5b9ba01374ad.zip
pfsense-483c3b5b43bf32815c29c91d653b5b9ba01374ad.tar.gz
Correct ipsec status page to make connect button work
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/ipsec.inc16
1 files changed, 16 insertions, 0 deletions
diff --git a/etc/inc/ipsec.inc b/etc/inc/ipsec.inc
index 15f3c06..da6ebcc 100644
--- a/etc/inc/ipsec.inc
+++ b/etc/inc/ipsec.inc
@@ -571,6 +571,22 @@ function ipsec_get_descr($ikeid) {
return $descr;
}
+function ipsec_get_phase1($ikeid) {
+ global $config;
+
+ if (!isset($config['ipsec']['phase1']) ||
+ !is_array($config['ipsec']['phase1']))
+ return '';
+
+ $a_phase1 = $config['ipsec']['phase1'];
+ foreach ($a_phase1 as $p1) {
+ if ($p1['ikeid'] == $ikeid) {
+ return $p1;
+ }
+ }
+ unset($a_phase1);
+}
+
function ipsec_fixup_ip($ipaddr) {
if (is_ipaddrv6($ipaddr) || is_subnetv6($ipaddr))
return Net_IPv6::compress(Net_IPv6::uncompress($ipaddr));
OpenPOWER on IntegriCloud