diff options
author | Jean Cyr <jcyr@dillobits.com> | 2013-09-02 02:55:09 -0400 |
---|---|---|
committer | Jean Cyr <jcyr@dillobits.com> | 2013-09-02 02:55:09 -0400 |
commit | b3e0fedf55c37e0ef5a4e43ecebd471697045b44 (patch) | |
tree | ada27f14879fbbc5d2db8a7b0b74d7cbee93e598 /etc/inc | |
parent | f89f3b3d2197bcaeb5b97575e25b97581bd9d207 (diff) | |
download | pfsense-b3e0fedf55c37e0ef5a4e43ecebd471697045b44.zip pfsense-b3e0fedf55c37e0ef5a4e43ecebd471697045b44.tar.gz |
Dummynet does not require burst size specification
Dummynet traffic shaper does not require burst size specification and
assumes 0 if not specified. Allow user to leave burst field blank/
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/shaper.inc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/etc/inc/shaper.inc b/etc/inc/shaper.inc index 078652b..f5c6a2c 100644 --- a/etc/inc/shaper.inc +++ b/etc/inc/shaper.inc @@ -3047,8 +3047,6 @@ 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}"])) - $input_errors[] = sprintf(gettext("Burst for schedule %s must be an integer."), $data["bwsched{$i}"]); else $entries++; } @@ -3165,7 +3163,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 +3172,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; |