summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2011-08-02 21:15:21 +0000
committerErmal <eri@pfsense.org>2011-08-02 21:17:30 +0000
commitb0d088eb6fe3cf91ddd4aade1540a5749f551aa7 (patch)
tree3dd910c23bd6306344b69270da4393db6e5ab139 /usr
parentea858be08a3b33f009ebf4f5d0940568471e456f (diff)
downloadpfsense-b0d088eb6fe3cf91ddd4aade1540a5749f551aa7.zip
pfsense-b0d088eb6fe3cf91ddd4aade1540a5749f551aa7.tar.gz
Correctly check the values for VoIP on multi_lan traffic shaper wizard. Reported-by: http://forum.pfsense.org/index.php/topic,32833.15.html. Ticket #1728
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/wizards/traffic_shaper_wizard_multi_lan.inc74
1 files changed, 36 insertions, 38 deletions
diff --git a/usr/local/www/wizards/traffic_shaper_wizard_multi_lan.inc b/usr/local/www/wizards/traffic_shaper_wizard_multi_lan.inc
index 48766ca..db56f7a 100644
--- a/usr/local/www/wizards/traffic_shaper_wizard_multi_lan.inc
+++ b/usr/local/www/wizards/traffic_shaper_wizard_multi_lan.inc
@@ -161,7 +161,7 @@ function step2_stepbeforeformdisplay() {
$opts['value'] = "Gb";
$opts['name'] = "Gbit/s";
$field['options']['option'][] = $opts;
- $field['bindstofield'] = "ezshaper->step2->conn{$i}downloadspeed";
+ $field['bindstofield'] = "ezshaper->step2->conndownloadspeed";
$fields[] = $field;
for ($i = 0; $i < $numberofconnections; $i++) {
@@ -196,7 +196,7 @@ function step2_stepbeforeformdisplay() {
$field['name'] = "conn{$i}downloadscheduler";
$field['displayname'] = "LAN Scheduler";
$field['type'] = "select";
- $field['typehint'] = "Queueing discipline to apply on the upload of this connection.";
+ $field['typehint'] = "Queueing discipline to apply on the download of this connection.";
$field['options']['option'] = array();
$opts = array();
$opts['name'] = "HFSC";
@@ -301,42 +301,40 @@ function step3_stepsubmitphpaction() {
$stepid--;
return;
}
- $steps = intval($config['ezshaper']['step1']['numberofconnections']);
- for ($i = 0; $i < $steps; $i++) {
- if ($_POST["connuploadspeed"] == "%") {
- if (intval($_POST['connupload']) > 80) {
- $savemsg=gettext("You cannot set the VoIP upload bandwidth on connection {$i} higher than 80% of the connection.");
- $stepid--;
- return;
- }
- } else {
- $factor = wizard_get_bandwidthtype_scale($config['ezshaper']['step2']["conn{$i}uploadspeed"]);
- $ifbw = $factor * floatval($config['ezshaper']['step2']["conn{$i}upload"]);
- $factor = wizard_get_bandwidthtype_scale($_POST["connuploadspeed"]);
- $input_bw = $factor * floatval($_POST["connupload"]);
- if ((0.8 * $ifbw) < $input_bw) {
- $savemsg=gettext("You cannot set the VoIP upload bandwidth on connection {$i} higher than 80% of the connection.");
- $stepid--;
- return;
- }
- }
- if ($_POST["conndownloadspeed"] == "%") {
- if (intval($_POST['conndownload']) > 80) {
- $savemsg=gettext("You cannot set the VoIP download bandwidth on connection {$i} higher than 80% of the connection.");
- $stepid--;
- return;
- }
- } else {
- $factor = wizard_get_bandwidthtype_scale($config['ezshaper']['step2']["conn{$i}downloadspeed"]);
- $ifbw = $factor * floatval($config['ezshaper']['step2']["conn{$i}download"]);
- $factor = wizard_get_bandwidthtype_scale($_POST["conndownloadspeed"]);
- $input_bw = $factor * floatval($_POST["conndownload"]);
- if ((0.8 * $ifbw) < $input_bw) {
- $savemsg=gettext("You cannot set the VoIP download bandwidth on connection {$i} higher than 80% of the connection.");
- $stepid--;
- return;
- }
- }
+
+ if ($_POST["connuploadspeed"] == "%") {
+ if (intval($_POST['connupload']) > 80) {
+ $savemsg=gettext("You cannot set the VoIP upload bandwidth on connection {$i} higher than 80% of the connection.");
+ $stepid--;
+ return;
+ }
+ } else {
+ $factor = wizard_get_bandwidthtype_scale($config['ezshaper']['step2']["connuploadspeed"]);
+ $ifbw = $factor * floatval($config['ezshaper']['step2']["connupload"]);
+ $factor = wizard_get_bandwidthtype_scale($_POST["connuploadspeed"]);
+ $input_bw = $factor * floatval($_POST["connupload"]);
+ if ((0.8 * $ifbw) < $input_bw) {
+ $savemsg=gettext("You cannot set the VoIP upload bandwidth on WAN connection higher than 80% of the connection.");
+ $stepid--;
+ return;
+ }
+ }
+ if ($_POST["conndownloadspeed"] == "%") {
+ if (intval($_POST['conndownload']) > 80) {
+ $savemsg=gettext("You cannot set the VoIP download bandwidth on connection higher than 80% of the connection.");
+ $stepid--;
+ return;
+ }
+ } else {
+ $factor = wizard_get_bandwidthtype_scale($config['ezshaper']['step2']["conndownloadspeed"]);
+ $ifbw = $factor * floatval($config['ezshaper']['step2']["conndownload"]);
+ $factor = wizard_get_bandwidthtype_scale($_POST["conndownloadspeed"]);
+ $input_bw = $factor * floatval($_POST["conndownload"]);
+ if ((0.8 * $ifbw) < $input_bw) {
+ $savemsg=gettext("You cannot set the VoIP download bandwidth on connection higher than 80% of the connection.");
+ $stepid--;
+ return;
+ }
}
}
OpenPOWER on IntegriCloud