summaryrefslogtreecommitdiffstats
path: root/usr/local/www/vpn_openvpn_client.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-11-16 11:59:21 -0500
committerjim-p <jimp@pfsense.org>2011-11-16 12:02:47 -0500
commitb422360c35040c2753c6098758dcfea8960f4b38 (patch)
tree3442e222ead47fb1e6d4e885e47e5a90243a37a2 /usr/local/www/vpn_openvpn_client.php
parent4ec48253bacf016ede18dd6d08662804266b4747 (diff)
downloadpfsense-b422360c35040c2753c6098758dcfea8960f4b38.zip
pfsense-b422360c35040c2753c6098758dcfea8960f4b38.tar.gz
Actually save the value typed in the bandwidth limit box for the openvpn client instead of ignoring it.
Diffstat (limited to 'usr/local/www/vpn_openvpn_client.php')
-rw-r--r--usr/local/www/vpn_openvpn_client.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/usr/local/www/vpn_openvpn_client.php b/usr/local/www/vpn_openvpn_client.php
index d2575a0..425040c 100644
--- a/usr/local/www/vpn_openvpn_client.php
+++ b/usr/local/www/vpn_openvpn_client.php
@@ -129,6 +129,7 @@ if($_GET['act']=="edit"){
$pconfig['tunnel_network'] = $a_client[$id]['tunnel_network'];
$pconfig['remote_network'] = $a_client[$id]['remote_network'];
+ $pconfig['use_shaper'] = $a_client[$id]['use_shaper'];
$pconfig['compression'] = $a_client[$id]['compression'];
$pconfig['passtos'] = $a_client[$id]['passtos'];
@@ -191,6 +192,9 @@ if ($_POST) {
if ($result = openvpn_validate_cidr($pconfig['remote_network'], 'Remote network'))
$input_errors[] = $result;
+ if (!empty($pconfig['use_shaper']) && (!is_numeric($pconfig['use_shaper']) || ($pconfig['use_shaper'] <= 0)))
+ $input_errors[] = gettext("The bandwidth limit must be a positive numeric value.");
+
if ($pconfig['autokey_enable'])
$pconfig['shared_key'] = openvpn_create_key();
@@ -259,6 +263,7 @@ if ($_POST) {
$client['tunnel_network'] = $pconfig['tunnel_network'];
$client['remote_network'] = $pconfig['remote_network'];
+ $client['use_shaper'] = $pconfig['use_shaper'];
$client['compression'] = $pconfig['compression'];
$client['passtos'] = $pconfig['passtos'];
OpenPOWER on IntegriCloud