diff options
author | Ermal Luçi <eri@pfsense.org> | 2013-09-03 00:06:25 -0700 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2013-09-03 00:06:25 -0700 |
commit | 4a6f3d968aec393557ea86541aa1ead58a2a21ae (patch) | |
tree | 58d66e12181bb7e79274d28eb2df6df2f86f80ec | |
parent | ec532672c6aeb139ce0bdf812c9bb8cd1ae1ef90 (diff) | |
parent | 9880a11d3ffdb4ec803f0ee7650493beca12315f (diff) | |
download | pfsense-4a6f3d968aec393557ea86541aa1ead58a2a21ae.zip pfsense-4a6f3d968aec393557ea86541aa1ead58a2a21ae.tar.gz |
Merge pull request #791 from jean-m-cyr/RELENG_2_1
Dummynet does not require burst size specification
-rw-r--r-- | etc/inc/shaper.inc | 7 |
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; |