summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/VyattaQosTrafficLimiter.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/VyattaQosTrafficLimiter.pm b/scripts/VyattaQosTrafficLimiter.pm
index 45e744e..2907590 100644
--- a/scripts/VyattaQosTrafficLimiter.pm
+++ b/scripts/VyattaQosTrafficLimiter.pm
@@ -47,9 +47,10 @@
my ( $self, $config ) = @_;
my $level = $config->setLevel();
my @matches = ();
-
- $self->{rate} = VyattaQosUtil::getRate($config->returnValue("bandwidth"));
- defined $self->{rate} or die "$level bandwidth not defined\n";
+ my $rate = $config->returnValue("bandwidth");
+
+ defined $rate or die "bandwidth must be defined for $level\n";
+ $self->{rate} = VyattaQosUtil::getRate($rate);
$self->{priority} = $config->returnValue("priority");