diff options
author | Matthew Grooms <mgrooms@pfsense.org> | 2008-08-28 23:58:09 +0000 |
---|---|---|
committer | Matthew Grooms <mgrooms@pfsense.org> | 2008-08-28 23:58:09 +0000 |
commit | 539fcd7ed6103ebe4dd20f00edeafb30a2af0545 (patch) | |
tree | 655973962f29bfaf5ec71495dc815677b7fc41f4 | |
parent | ed2fba4db651806f49d0c5bb7c42955ff8d014bb (diff) | |
download | pfsense-539fcd7ed6103ebe4dd20f00edeafb30a2af0545.zip pfsense-539fcd7ed6103ebe4dd20f00edeafb30a2af0545.tar.gz |
Correct some of the logic in the get_vpns_list() that was committed in the
last revision.
-rw-r--r-- | etc/inc/filter.inc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index bd30943..487f9d7 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -350,10 +350,11 @@ function get_vpns_list() { $vpns_arr = array(); /* ipsec */ - if ($config['ipsec']['phase2']) - foreach ($config['ipsec']['phase2'] as $ph2ent) - if($ph2ent['remoteid']['address']) - $vpns_arr[] = $ph2ent['remoteid']['address'] . "/" . $ph2ent['remoteid']['netbits']; + if (isset($config['ipsec']['enable'])) + if (is_array($config['ipsec']['phase2'])) + foreach ($config['ipsec']['phase2'] as $ph2ent) + if(!$ph2ent['mobile']) + $vpns_arr[] = ipsec_idinfo_to_cidr($ph2ent['remoteid']); /* openvpn */ foreach (array('client', 'server') as $type) @@ -2906,4 +2907,4 @@ function return_vpn_subnet($adr) } -?>
\ No newline at end of file +?> |