diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-06-15 11:05:51 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-06-15 11:05:51 -0700 |
commit | e69c7c849e70edd757b160488f83035f2a16be66 (patch) | |
tree | 1e75b66c56fa4e2ba58d3a262595bcab532d7494 | |
parent | 4ce140e2d2376b647f5dc65de0316bd331167a41 (diff) | |
download | vyatta-cfg-qos-e69c7c849e70edd757b160488f83035f2a16be66.tar.gz vyatta-cfg-qos-e69c7c849e70edd757b160488f83035f2a16be66.zip |
Require bandwidth setting for default class
Check for bandwidth value on default class (Bug 4551)
-rw-r--r-- | lib/Vyatta/Qos/TrafficShaper.pm | 4 |
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 (@_) { |