Correct some of the logic in the get_vpns_list() that was committed in the

last revision.
This commit is contained in:
Matthew Grooms 2008-08-28 23:58:09 +00:00
parent ed2fba4db6
commit 539fcd7ed6

View File

@ -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)
}
?>
?>