diff options
author | jim-p <jimp@pfsense.org> | 2012-06-06 16:58:41 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2012-06-06 16:58:41 -0400 |
commit | a1b9105b25d6e13fefac28f2720b612e45f4d2ab (patch) | |
tree | f05bdedaaf9485d8d5396adbf19359b644ab8a33 /etc/inc/openvpn.inc | |
parent | 846c7b7727ddd934754ab562fd5af791fc0a6a51 (diff) | |
download | pfsense-a1b9105b25d6e13fefac28f2720b612e45f4d2ab.zip pfsense-a1b9105b25d6e13fefac28f2720b612e45f4d2ab.tar.gz |
Only add openvpn acl script lines if it's a server mode that does user auth
Diffstat (limited to 'etc/inc/openvpn.inc')
-rw-r--r-- | etc/inc/openvpn.inc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc index bec3e9b..b72b709 100644 --- a/etc/inc/openvpn.inc +++ b/etc/inc/openvpn.inc @@ -376,8 +376,13 @@ function openvpn_reconfigure($mode, $settings) { $conf .= "up /usr/local/sbin/ovpn-linkup\n"; $conf .= "down /usr/local/sbin/ovpn-linkdown\n"; if (file_exists("/usr/local/sbin/openvpn.attributes.sh")) { - $conf .= "client-connect /usr/local/sbin/openvpn.attributes.sh\n"; - $conf .= "client-disconnect /usr/local/sbin/openvpn.attributes.sh\n"; + switch($settings['mode']) { + case 'server_user': + case 'server_tls_user': + $conf .= "client-connect /usr/local/sbin/openvpn.attributes.sh\n"; + $conf .= "client-disconnect /usr/local/sbin/openvpn.attributes.sh\n"; + break; + } } if (is_ipaddrv4($iface_ip)) { |