Enforce limiter delay 0<=x<=10000. Fixes #9921

(cherry picked from commit 8afa74bb09)
This commit is contained in:
jim-p 2019-11-25 10:06:53 -05:00
parent b3395df202
commit ab5ef410bd

View File

@ -3841,6 +3841,10 @@ class dnpipe_class extends dummynet_class {
if ($data['delay'] && (!is_numeric($data['delay']))) {
$input_errors[] = gettext("Delay must be an integer.");
}
if ($data['delay'] && is_numeric($data['delay']) &&
(($data['delay'] < 0) || ($data['delay'] > 10000))) {
$input_errors[] = gettext("Delay must be an integer between 0 and 10000.");
}
/* Limiter patch */
$selectedScheduler = getSchedulers()[$data['sched']];