From 6141a91b4606b9fec2edf8b55e352c33a68875f8 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Fri, 25 Jul 2014 09:15:54 -0300 Subject: Disable bandwidth checks for PRIQ, it should fix #3537 --- .../wizards/traffic_shaper_wizard_multi_all.inc | 48 ++++++++++++---------- 1 file changed, 27 insertions(+), 21 deletions(-) (limited to 'usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc') 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 7b2ff68..c3e0e28 100644 --- a/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc +++ b/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc @@ -306,27 +306,29 @@ function step2_stepsubmitphpaction() { $stepid--; return; } - if (!is_numeric($_POST["conn{$i}upload"])) { - $savemsg = gettext("Upload bandwidth of connection {$i} is not valid."); - $stepid--; - return; - } - if (!is_numeric($_POST["conn{$i}download"])) { - $savemsg = gettext("Download bandwidth of connection {$i} is not valid."); - $stepid--; - return; - } - $upbw = $_POST["conn{$i}upload"]; - $downbw = $_POST["conn{$i}download"]; - if ($upbw < 1 || $downbw < 1) { - $savemsg = gettext("You cannot specify 0 bandwidth!"); - $stepid--; - return; - } - if (intval($upbw) < 128 && $_POST["conn{$i}uploadspeed"] == "Kb" && trim($_POST["conn{$i}uploadscheduler"]) == "CBQ") { - $savemsg=gettext("Uploads smaller than 128Kbit/s is not supported for connection {$i} on CBQ scheduler."); - $stepid--; - return; + if (trim($_POST["conn{$i}uploadscheduler"]) != "PRIQ") { + if (!is_numeric($_POST["conn{$i}upload"])) { + $savemsg = gettext("Upload bandwidth of connection {$i} is not valid."); + $stepid--; + return; + } + if (!is_numeric($_POST["conn{$i}download"])) { + $savemsg = gettext("Download bandwidth of connection {$i} is not valid."); + $stepid--; + return; + } + $upbw = $_POST["conn{$i}upload"]; + $downbw = $_POST["conn{$i}download"]; + if ($upbw < 1 || $downbw < 1) { + $savemsg = gettext("You cannot specify 0 bandwidth!"); + $stepid--; + return; + } + if (intval($upbw) < 128 && $_POST["conn{$i}uploadspeed"] == "Kb" && trim($_POST["conn{$i}uploadscheduler"]) == "CBQ") { + $savemsg=gettext("Uploads smaller than 128Kbit/s is not supported for connection {$i} on CBQ scheduler."); + $stepid--; + return; + } } } for ($j = 0; $j < $localint; $j++) { @@ -541,6 +543,8 @@ function step3_stepsubmitphpaction() { $steps = intval($config['ezshaper']['step1']['numberofconnections']); for ($i = 0; $i < $steps; $i++) { + if ($config['ezshaper']['step2']["conn{$i}uploadscheduler"] == "PRIQ") + continue; if (!is_numeric($_POST["conn{$i}upload"])) { $savemsg = gettext("Upload bandwidth of connection {$i} is not valid."); $stepid--; @@ -567,6 +571,8 @@ function step3_stepsubmitphpaction() { $localint = intval($config['ezshaper']['step1']['numberoflocalinterfaces']); for ($i = 0; $i < $localint; $i++) { + if ($config['ezshaper']['step2']["local{$i}downloadscheduler"] == "PRIQ") + continue; if (!is_numeric($_POST["local{$i}download"])) { $savemsg = gettext("Download bandwidth of connection {$i} is not valid."); $stepid--; -- cgit v1.1