From 5d8cd81abdd4a3b5e2f4af40b9714fd7066e33fb Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 30 Jun 2010 11:07:50 -0400 Subject: [PATCH] Reorg this test a little, and make sure we only add client-to-client for remote access types. --- etc/inc/openvpn.inc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc index 3fe4574e2f..3a9701af2f 100644 --- a/etc/inc/openvpn.inc +++ b/etc/inc/openvpn.inc @@ -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