diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-06-15 11:05:51 -0700 |
---|---|---|
committer | Stephen Hemminger <shemminger@lenny.localdomain> | 2009-10-01 13:51:20 -0700 |
commit | 78396db2d9b7b7a9f05fb2a27616cf37660b14d7 (patch) | |
tree | ddc09609fee9f49a880b4544bbdbe4d3fc5908b7 /lib/Vyatta/Qos/TrafficShaper.pm | |
parent | 016dd00049e8c2bae87831c04a450f68a3278898 (diff) | |
download | vyatta-cfg-qos-78396db2d9b7b7a9f05fb2a27616cf37660b14d7.tar.gz vyatta-cfg-qos-78396db2d9b7b7a9f05fb2a27616cf37660b14d7.zip |
Require bandwidth setting for default class
Check for bandwidth value on default class (Bug 4551)
(cherry picked from commit e69c7c849e70edd757b160488f83035f2a16be66)
Diffstat (limited to 'lib/Vyatta/Qos/TrafficShaper.pm')
-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 (@_) { |