summaryrefslogtreecommitdiffstats
path: root/etc/inc/openvpn.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-10-31 14:50:06 -0400
committerjim-p <jimp@pfsense.org>2013-10-31 14:50:06 -0400
commitedba19827078642a765df3a49e60ab92968cacc6 (patch)
treebd2f5001e5855ae729d6f68256eab810daa4ddbe /etc/inc/openvpn.inc
parent85bdf99766d2ce15ecc8247644747fe91fa08bfa (diff)
downloadpfsense-edba19827078642a765df3a49e60ab92968cacc6.zip
pfsense-edba19827078642a765df3a49e60ab92968cacc6.tar.gz
Change OpenVPN Compression settings to cover the full range of allowed settings on OpenVPN (unset, off, on, adaptive) rather than a simple off/on switch that either doesn't set the value or enables it with adaptive (OpenVPN's default).
Diffstat (limited to 'etc/inc/openvpn.inc')
-rw-r--r--etc/inc/openvpn.inc11
1 files changed, 9 insertions, 2 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc
index cadc32b..57ee7c3 100644
--- a/etc/inc/openvpn.inc
+++ b/etc/inc/openvpn.inc
@@ -94,6 +94,13 @@ $openvpn_client_modes = array(
'p2p_tls' => gettext("Peer to Peer ( SSL/TLS )"),
'p2p_shared_key' => gettext("Peer to Peer ( Shared Key )") );
+global $openvpn_compression_modes;
+$openvpn_compression_modes = array(
+ 'none' => gettext("No Preference"),
+ 'no' => gettext("Disabled - No Compression"),
+ 'adaptive' => gettext("Enabled with Adaptive Compression"),
+ 'yes' => gettext("Enabled without Adaptive Compression"));
+
function openvpn_create_key() {
$fp = popen("/usr/local/sbin/openvpn --genkey --secret /dev/stdout 2>/dev/null", "r");
@@ -743,8 +750,8 @@ function openvpn_reconfigure($mode, $settings) {
break;
}
- if ($settings['compression'])
- $conf .= "comp-lzo\n";
+ if (!empty($settings['compression']))
+ $conf .= "comp-lzo {$settings['compression']}\n";
if ($settings['passtos'])
$conf .= "passtos\n";
OpenPOWER on IntegriCloud