summaryrefslogtreecommitdiffstats
path: root/etc/inc/shaper.inc
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:29 -0300
commit0f0f7b2cbed88c922b08d5bbada031b69df09e17 (patch)
treef0c7a4f02961c15267ff06c2582b83a8426c6cbe /etc/inc/shaper.inc
parente97b547eb7c6d825b888c7c36173efce200cc2a5 (diff)
downloadpfsense-0f0f7b2cbed88c922b08d5bbada031b69df09e17.zip
pfsense-0f0f7b2cbed88c922b08d5bbada031b69df09e17.tar.gz
Fix 'Packet loss rate' and 'Bucket Size' range checking
Diffstat (limited to 'etc/inc/shaper.inc')
-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 5c36ffe..ff90c01 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