summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-12-29 16:52:17 +0000
committerErmal <eri@pfsense.org>2010-12-29 16:53:25 +0000
commita9a5b9570f0c7c05e4ad98eede0978827b818185 (patch)
tree997a9566145e2864812657d7a1ce85acc88e3bb3 /usr/local
parent133bd2b285cc0100a65b7684b0b239e108abc560 (diff)
downloadpfsense-a9a5b9570f0c7c05e4ad98eede0978827b818185.zip
pfsense-a9a5b9570f0c7c05e4ad98eede0978827b818185.tar.gz
Fix multi_all wizard to properly verify VoIP bandwidth specified.
Diffstat (limited to 'usr/local')
-rwxr-xr-xusr/local/www/wizards/traffic_shaper_wizard_multi_all.inc24
1 files changed, 13 insertions, 11 deletions
diff --git a/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc b/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc
index 931185a..42f6ddb 100755
--- a/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc
+++ b/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc
@@ -39,7 +39,7 @@ function step1_submitphpaction() {
$stepid--;
return;
}
- if (intval($_POST['numberofconnections']) < 1) {
+ if (intval($_POST['numberoflocalinterfaces']) < 1) {
$savemsg=gettext("The number of connections should be greater than 1.");
$stepid--;
return;
@@ -67,7 +67,7 @@ function step2_stepbeforeformdisplay() {
}
$numberoflocalinterfaces = intval($config['ezshaper']['step1']['numberoflocalinterfaces']);
- if ($numberoflocalinterfaces > $numberofinterfaces) {
+ if ($numberoflocalinterfaces > ($numberofinterfaces - $numberofconnections)) {
$savemsg=gettext("You have less interfaces than number of connections!");
$stepid--;
return;
@@ -527,19 +527,21 @@ function step3_stepsubmitphpaction() {
}
if ($_POST["local{$i}downloadspeed"] == "%") {
if (intval($_POST["local{$i}download"]) > 80) {
- $savemsg=gettext("You cannot set the VoIP upload bandwidth on connection {$i} higher than 80% of the connection.");
+ $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["local{$i}downloadspeed"]);
- $input_bw = $factor * floatval($_POST["local{$i}download"]);
- 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;
+ for ($j = 0; $j < $steps; $j++) {
+ $factor = wizard_get_bandwidthtype_scale($config['ezshaper']['step2']["conn{$j}downloadspeed"]);
+ $ifbw = $factor * floatval($config['ezshaper']['step2']["conn{$j}download"]);
+ $factor = wizard_get_bandwidthtype_scale($_POST["local{$i}downloadspeed"]);
+ $input_bw = $factor * floatval($_POST["local{$i}download"]);
+ if ((0.8 * $ifbw) < $input_bw) {
+ $savemsg=gettext("You cannot set the VoIP download bandwidth on connection {$j} higher than 80% of the connection.");
+ $stepid--;
+ return;
+ }
}
}
}
OpenPOWER on IntegriCloud