summaryrefslogtreecommitdiffstats
path: root/etc/inc/openvpn.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-06-06 16:58:41 -0400
committerjim-p <jimp@pfsense.org>2012-06-06 16:58:41 -0400
commita1b9105b25d6e13fefac28f2720b612e45f4d2ab (patch)
treef05bdedaaf9485d8d5396adbf19359b644ab8a33 /etc/inc/openvpn.inc
parent846c7b7727ddd934754ab562fd5af791fc0a6a51 (diff)
downloadpfsense-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.inc9
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)) {
OpenPOWER on IntegriCloud