summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Vyatta/Qos/RateLimiter.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Vyatta/Qos/RateLimiter.pm b/lib/Vyatta/Qos/RateLimiter.pm
index ac0cd2c..d4b3f95 100644
--- a/lib/Vyatta/Qos/RateLimiter.pm
+++ b/lib/Vyatta/Qos/RateLimiter.pm
@@ -36,8 +36,9 @@ sub new {
my $class = ref($that) || $that;
my $self = {%fields};
- $self->{_rate} = getRate($config->returnValue("bandwidth"));
- defined $self->{_rate} or die "$level bandwidth not defined\n";
+ my $bw = config->returnValue("bandwidth");
+ defined $bw or die "$level bandwidth not defined\n";
+ $self->{_rate} = getRate($bw);
$self->{_burst} = $config->returnValue("burst");
defined $self->{_burst} or die "$level burst not defined\n";