summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/shaper.inc7
1 files changed, 3 insertions, 4 deletions
diff --git a/etc/inc/shaper.inc b/etc/inc/shaper.inc
index 078652b..4aa967c 100644
--- a/etc/inc/shaper.inc
+++ b/etc/inc/shaper.inc
@@ -3047,7 +3047,7 @@ class dnpipe_class extends dummynet_class {
if (!empty($data["bandwidth{$i}"])) {
if (!is_numeric($data["bandwidth{$i}"]))
$input_errors[] = sprintf(gettext("Bandwidth for schedule %s must be an integer."), $data["bwsched{$i}"]);
- else if (!is_numeric($data["burst{$i}"]))
+ else if (($data["burst{$i}"] != "") && (!is_numeric($data["burst{$i}"])))
$input_errors[] = sprintf(gettext("Burst for schedule %s must be an integer."), $data["bwsched{$i}"]);
else
$entries++;
@@ -3165,7 +3165,7 @@ class dnpipe_class extends dummynet_class {
if ($bw['bwsched'] == $schedule['name']) {
if (filter_get_time_based_rule_status($schedule)) {
$pfq_rule .= " bw ".trim($bw['bw']).$bw['bwscale'];
- if (is_numeric($bw['burst']) && ($bw['burst'] >= 0))
+ if (is_numeric($bw['burst']) && ($bw['burst'] > 0))
$pfq_rule .= " burst ".trim($bw['burst']).$bw['bwscale'];
$found = true;
break;
@@ -3174,13 +3174,12 @@ class dnpipe_class extends dummynet_class {
}
} else {
$pfq_rule .= " bw 0";
- $pfq_rule .= " burst 0";
$found = true;
break;
}
} else {
$pfq_rule .= " bw ".trim($bw['bw']).$bw['bwscale'];
- if (is_numeric($bw['burst']) && ($bw['burst'] >= 0))
+ if (is_numeric($bw['burst']) && ($bw['burst'] > 0))
$pfq_rule .= " burst ".trim($bw['burst']).$bw['bwscale'];
$found = true;
break;
OpenPOWER on IntegriCloud