From 96bd855790cefe24c74256adb034fc1e14a4c915 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Tue, 24 Mar 2015 17:33:28 +0100 Subject: [PATCH] openvpn: remove obsolete probing for /etc/version --- src/pkg/openvpn-client-export.inc | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/pkg/openvpn-client-export.inc b/src/pkg/openvpn-client-export.inc index 1597d3c8e..1bd64cd85 100644 --- a/src/pkg/openvpn-client-export.inc +++ b/src/pkg/openvpn-client-export.inc @@ -1,13 +1,11 @@ Copyright (C) 2008 Shrew Soft Inc Copyright (C) 2010 Ermal Luci - All rights reserved. - - Parts of this code was originally based on vpn_ipsec_sad.php Copyright (C) 2003-2004 Manuel Kasper + All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -179,7 +177,6 @@ function openvpn_client_export_validate_config($srvid, $usrid, $crtid) { function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $verifyservercn, $randomlocalport, $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 = ""; @@ -327,17 +324,14 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $verifys // add optional settings if (!empty($settings['compression'])) { - if ($pfs_version > 2.1) - $conf .= "comp-lzo {$settings['compression']}{$nl}"; - else - $conf .= "comp-lzo{$nl}"; + $conf .= "comp-lzo {$settings['compression']}{$nl}"; } - if ($settings['passtos']) + if ($settings['passtos']) { $conf .= "passtos{$nl}"; + } - if ($openvpnmanager) - { + if ($openvpnmanager) { if (!empty($settings['client_mgmt_port'])) { $client_mgmt_port = $settings['client_mgmt_port']; } else {