From 78396db2d9b7b7a9f05fb2a27616cf37660b14d7 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 15 Jun 2009 11:05:51 -0700 Subject: Require bandwidth setting for default class Check for bandwidth value on default class (Bug 4551) (cherry picked from commit e69c7c849e70edd757b160488f83035f2a16be66) --- lib/Vyatta/Qos/TrafficShaper.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/Vyatta/Qos/TrafficShaper.pm') 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 (@_) { -- cgit v1.2.3