summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-10-11 08:25:12 -0300
committerRenato Botelho <garga@FreeBSD.org>2013-10-11 08:25:12 -0300
commit7e7a65b073fe4b9e526c3be28d9eb42fb76881a2 (patch)
treeff6cf16c030025e7dc7a93407f5ade8b187bd478 /etc
parentb35bcd45b30a447b1814e5649d62b3beb5897a2c (diff)
downloadpfsense-7e7a65b073fe4b9e526c3be28d9eb42fb76881a2.zip
pfsense-7e7a65b073fe4b9e526c3be28d9eb42fb76881a2.tar.gz
Fix 'Packet loss rate' and 'Bucket Size' range checking
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/shaper.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/inc/shaper.inc b/etc/inc/shaper.inc
index 77ce7ba..1dd79d7 100644
--- a/etc/inc/shaper.inc
+++ b/etc/inc/shaper.inc
@@ -2894,11 +2894,11 @@ class dummynet_class {
shaper_do_input_validation($data, $reqdfields, $reqdfieldsn, $input_errors);
- if ($data['plr'] && ((!is_numeric($data['plr'])) ||
- ($data['plr'] < 0 && $data['plr'] > 1)))
+ if ($data['plr'] && (!is_numeric($data['plr']) ||
+ ($data['plr'] < 0) || ($data['plr'] > 1)))
$input_errors[] = gettext("Plr must be a value between 0 and 1.");
- if (($data['buckets'] && (!is_numeric($data['buckets']))) ||
- ($data['buckets'] < 16 && $data['buckets'] > 65535))
+ if ($data['buckets'] && (!is_numeric($data['buckets']) ||
+ ($data['buckets'] < 16) || ($data['buckets'] > 65535)))
$input_errors[] = gettext("Buckets must be an integer between 16 and 65535.");
if ($data['qlimit'] && (!is_numeric($data['qlimit'])))
$input_errors[] = gettext("Queue limit must be an integer");
OpenPOWER on IntegriCloud