diff options
author | jim-p <jimp@pfsense.org> | 2011-11-16 11:59:21 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-11-16 12:04:07 -0500 |
commit | bf7b597a31efb59919fdea18955647bb504cd699 (patch) | |
tree | d788adae78f02ca43b5800683791c2a388c747ed | |
parent | 90b3c01c061e86c9f24777c93e9fc81a6d9ef004 (diff) | |
download | pfsense-bf7b597a31efb59919fdea18955647bb504cd699.zip pfsense-bf7b597a31efb59919fdea18955647bb504cd699.tar.gz |
Actually save the value typed in the bandwidth limit box for the openvpn client instead of ignoring it.
-rw-r--r-- | usr/local/www/vpn_openvpn_client.php | 5 |
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 97b7769..46f1ce7 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']; |