From 63017a732e0e4f1c3459106a5ac24abfea074877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=E7i?= Date: Tue, 16 Mar 2010 13:08:01 +0000 Subject: Ticket #430. Give a none option to allow for roadwarriors configs. --- etc/inc/vpn.inc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'etc/inc/vpn.inc') diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index 26631d7..1ebd07a 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -610,11 +610,13 @@ EOD; if ($ph2ent['mode'] == 'tunnel') { $localid_type = $ph2ent['localid']['type']; - if ($localid_type != "address") - $localid_type = "subnet"; - $localid_data = ipsec_idinfo_to_cidr($ph2ent['localid']); - $localid_spec = $localid_type." ".$localid_data." any"; + if ($localid_type == "none") + $localid_spec = " "; + else if ($localid_type != "address") { + $localid_type = "subnet"; + $localid_spec = $localid_type." ".$localid_data." any"; + } if (!isset($ph2ent['mobile'])) { $remoteid_type = $ph2ent['remoteid']['type']; @@ -808,7 +810,7 @@ EOD; } /* static route needed? */ - if (preg_match("/^carp/i", $ph1ent['interface'])) + if (preg_match("/^carp|^vip/i", $ph1ent['interface'])) $parentinterface = link_carp_interface_to_parent($ph1ent['interface']); else $parentinterface = $ph1ent['interface']; -- cgit v1.1