summaryrefslogtreecommitdiffstats
path: root/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@dds.nl>2011-02-16 09:11:05 +0100
committerSeth Mos <seth.mos@dds.nl>2011-02-16 09:11:05 +0100
commitf698b26293d5a1df1c87b4dbcd908b597da07493 (patch)
treeb0c9b856c1b869819c0032c5eec64d95184ce767 /usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc
parentbd40781aaa7aa947e924f21e2845d87be5993bbd (diff)
parentb807a1619230c8e19193a39ed8c4c513dd8e005b (diff)
downloadpfsense-f698b26293d5a1df1c87b4dbcd908b597da07493.zip
pfsense-f698b26293d5a1df1c87b4dbcd908b597da07493.tar.gz
Merge remote branch 'upstream/master'
Diffstat (limited to 'usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc')
-rwxr-xr-xusr/local/www/wizards/traffic_shaper_wizard_multi_all.inc34
1 files changed, 25 insertions, 9 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 f33283a..40f036d 100755
--- a/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc
+++ b/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc
@@ -495,10 +495,17 @@ function step3_stepsubmitphpaction() {
$steps = intval($config['ezshaper']['step1']['numberofconnections']);
for ($i = 0; $i < $steps; $i++) {
if (!is_numeric($_POST["conn{$i}upload"])) {
- $savemsg = gettext("Upload bandwidth of connection {$i} is not valid.");
+ $savemsg = gettext("Upload bandwidth of connection {$i} is not valid.");
+ $stepid--;
+ return;
+ }
+ if ($_POST["conn{$i}uploadspeed"] == "%") {
+ if (intval($_POST["conn{$i}upload"]) > 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["conn{$i}uploadspeed"]);
@@ -507,6 +514,7 @@ function step3_stepsubmitphpaction() {
$savemsg=gettext("You cannot set the VoIP upload bandwidth on connection {$i} higher than 80% of the connection.");
$stepid--;
return;
+ }
}
}
@@ -517,14 +525,22 @@ function step3_stepsubmitphpaction() {
$stepid--;
return;
}
- $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;
+ 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.");
+ $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;
+ }
}
}
OpenPOWER on IntegriCloud