diff options
Diffstat (limited to 'scripts/VyattaQosUtil.pm')
-rw-r--r-- | scripts/VyattaQosUtil.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/VyattaQosUtil.pm b/scripts/VyattaQosUtil.pm index 0c9ab83..d8a5fa1 100644 --- a/scripts/VyattaQosUtil.pm +++ b/scripts/VyattaQosUtil.pm @@ -47,9 +47,12 @@ sub getRate { die "Rate must be a number followed by a optional suffix (kbit, mbps, ...)\n"; } + } else { + # No suffix implies Kbps just as IOS + $num *= 8000; } - die "Negative rate not allowed\n" if ($num < 0); + ($num >= 0) or die "Negative rate not allowed\n"; return $num; } |