summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Vyatta/Qos/TrafficShaper.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Vyatta/Qos/TrafficShaper.pm b/lib/Vyatta/Qos/TrafficShaper.pm
index f51d373..10bc90a 100644
--- a/lib/Vyatta/Qos/TrafficShaper.pm
+++ b/lib/Vyatta/Qos/TrafficShaper.pm
@@ -72,8 +72,10 @@ sub _checkClasses {
my $rate = shift;
my $default = shift;
- # if auto, can't check at create must wait for policy to be applied
+ # if auto, can't check for constraints until later
$rate = ( $rate eq "auto") ? undef : getRate($rate);
+ die "Bandwidth not defined for default traffic\n"
+ unless $default->{_rate};
$default->rateCheck( $rate, "$level default" ) if $rate;
foreach my $class (@_) {