From bf7b597a31efb59919fdea18955647bb504cd699 Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 16 Nov 2011 11:59:21 -0500 Subject: Actually save the value typed in the bandwidth limit box for the openvpn client instead of ignoring it. --- usr/local/www/vpn_openvpn_client.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'usr') 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']; -- cgit v1.1