Reorg this test a little, and make sure we only add client-to-client for remote access types.

This commit is contained in:
jim-p 2010-06-30 11:07:50 -04:00
parent 107794cca9
commit 5d8cd81abd

View File

@ -416,17 +416,16 @@ function openvpn_reconfigure($mode,& $settings) {
$conf .= "push \"route $ip $mask\"\n";
}
// Configure client dhcp options
switch($settings['mode']) {
case 'server_tls':
case 'server_user':
case 'server_tls_user':
// Configure client dhcp options
openvpn_add_dhcpopts($settings, $conf);
if ($settings['client2client'])
$conf .= "client-to-client\n";
break;
}
if ($settings['client2client'])
$conf .= "client-to-client\n";
}
// client specific settings