aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-10-31 15:04:35 -0400
committerjim-p <jimp@pfsense.org>2013-10-31 15:04:35 -0400
commit5e20654577393326d9a7b87fff9f76ba3677a32b (patch)
tree6dd169e3c410d6ef62e4eb7822a9abb2266ba467 /config
parentd7423bc9ccd2e9084cbc35d5a577fdc7c9afa6be (diff)
downloadpfsense-packages-5e20654577393326d9a7b87fff9f76ba3677a32b.tar.gz
pfsense-packages-5e20654577393326d9a7b87fff9f76ba3677a32b.tar.bz2
pfsense-packages-5e20654577393326d9a7b87fff9f76ba3677a32b.zip
Allow the client export package to properly match the compression setting on 2.2
Diffstat (limited to 'config')
-rwxr-xr-xconfig/openvpn-client-export/openvpn-client-export.inc10
-rwxr-xr-xconfig/openvpn-client-export/openvpn-client-export.xml2
2 files changed, 9 insertions, 3 deletions
diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc
index 12842d64..c7afb9e6 100755
--- a/config/openvpn-client-export/openvpn-client-export.inc
+++ b/config/openvpn-client-export/openvpn-client-export.inc
@@ -172,6 +172,7 @@ function openvpn_client_export_validate_config($srvid, $usrid, $crtid) {
function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $quoteservercn, $usetoken, $nokeys = false, $proxy, $expformat = "baseconf", $outpass = "", $skiptls=false, $doslines=false, $openvpnmanager, $advancedoptions = "") {
global $config, $input_errors, $g;
+ $pfs_version = substr(trim(file_get_contents("/etc/version")),0,3);
$nl = ($doslines) ? "\r\n" : "\n";
$conf = "";
@@ -297,8 +298,13 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $quotese
}
// add optional settings
- if ($settings['compression'])
- $conf .= "comp-lzo{$nl}";
+ if (!empty($settings['compression'])) {
+ if ($pfs_version > 2.1)
+ $conf .= "comp-lzo {$settings['compression']}{$nl}";
+ else
+ $conf .= "comp-lzo{$nl}";
+ }
+
if ($settings['passtos'])
$conf .= "passtos{$nl}";
diff --git a/config/openvpn-client-export/openvpn-client-export.xml b/config/openvpn-client-export/openvpn-client-export.xml
index 37490d12..a1c263f1 100755
--- a/config/openvpn-client-export/openvpn-client-export.xml
+++ b/config/openvpn-client-export/openvpn-client-export.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<packagegui>
<name>OpenVPN Client Export</name>
- <version>1.1.2</version>
+ <version>1.1.3</version>
<title>OpenVPN Client Export</title>
<include_file>/usr/local/pkg/openvpn-client-export.inc</include_file>
<backup_file></backup_file>