summaryrefslogtreecommitdiffstats
path: root/etc/inc/ipsec.inc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2010-03-16 13:08:01 +0000
committerErmal Luçi <eri@pfsense.org>2010-03-16 13:08:01 +0000
commit63017a732e0e4f1c3459106a5ac24abfea074877 (patch)
tree62d247d9032b8a71c76a8db40433e1b34c016f3f /etc/inc/ipsec.inc
parent0b6ab3ec67c60e1c3dc51822bec8d796e21c3abf (diff)
downloadpfsense-63017a732e0e4f1c3459106a5ac24abfea074877.zip
pfsense-63017a732e0e4f1c3459106a5ac24abfea074877.tar.gz
Ticket #430. Give a none option to allow for roadwarriors configs.
Diffstat (limited to 'etc/inc/ipsec.inc')
-rw-r--r--etc/inc/ipsec.inc10
1 files changed, 7 insertions, 3 deletions
diff --git a/etc/inc/ipsec.inc b/etc/inc/ipsec.inc
index c55bfea..d80f1c2 100644
--- a/etc/inc/ipsec.inc
+++ b/etc/inc/ipsec.inc
@@ -163,6 +163,7 @@ function ipsec_idinfo_to_cidr(& $idinfo,$addrbits = false) {
return $idinfo['address'];
case "network":
return $idinfo['address']."/".$idinfo['netbits'];
+ case "none":
case "mobile":
return "0.0.0.0/0";
default:
@@ -186,11 +187,12 @@ function ipsec_idinfo_to_subnet(& $idinfo,$addrbits = false) {
return $idinfo['address']."/255.255.255.255";
else
return $idinfo['address'];
+ case "none":
case "network":
return $idinfo['address']."/".gen_subnet_mask($idinfo['netbits']);
case "mobile":
return "0.0.0.0/0";
- default:
+ default:
$address = get_interface_ip($idinfo['type']);
$netbits = get_interface_subnet($idinfo['type']);
$address = gen_subnet($address,$netbits);
@@ -210,8 +212,10 @@ function ipsec_idinfo_to_text(& $idinfo) {
return $idinfo['address'];
case "network":
return $idinfo['address']."/".$idinfo['netbits'];
- case "mobile":
- return "Mobile Client";
+ case "mobile":
+ return "Mobile Client";
+ case "none":
+ return "None";
default:
return strtoupper($idinfo['type']);
}
OpenPOWER on IntegriCloud