diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-02-06 10:29:43 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-02-06 10:29:43 -0800 |
commit | b67e379379ca5be816c7d6d9cdcec99395556733 (patch) | |
tree | 4b1ed37060b4be7c819d899ddacef524b9d3dd59 /scripts/VyattaQosUtil.pm | |
parent | 0b8d73903c3a1245c95d3ed92756fe3df649bbed (diff) | |
download | vyatta-cfg-qos-b67e379379ca5be816c7d6d9cdcec99395556733.tar.gz vyatta-cfg-qos-b67e379379ca5be816c7d6d9cdcec99395556733.zip |
rename rate to bandwidth
Make qos syntax more familar to IOS users.
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; } |