summaryrefslogtreecommitdiffstats
path: root/etc/inc/ipsec.inc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/inc/ipsec.inc')
-rw-r--r--etc/inc/ipsec.inc19
1 files changed, 18 insertions, 1 deletions
diff --git a/etc/inc/ipsec.inc b/etc/inc/ipsec.inc
index 332f300..2653297 100644
--- a/etc/inc/ipsec.inc
+++ b/etc/inc/ipsec.inc
@@ -469,4 +469,21 @@ function ipsec_mobilekey_sort() {
usort($config['ipsec']['mobilekey'], "mobilekeycmp");
}
-?> \ No newline at end of file
+function ipsec_get_number_of_phase2($ikeid) {
+ global $config;
+ $a_phase2 = $config['ipsec']['phase2'];
+
+ $nbph2=0;
+
+ if (is_array($a_phase2) && count($a_phase2)) {
+ foreach ($a_phase2 as $ph2tmp) {
+ if ($ph2tmp['ikeid'] == $ikeid) {
+ $nbph2++;
+ }
+ }
+ }
+
+ return $nbph2;
+}
+
+?>
OpenPOWER on IntegriCloud