From 6031bdeb50c8e919227cfea2ac573b8a4af7e0a4 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 8 May 2008 11:20:48 -0700 Subject: Fail on commit if ceiling is less than bandwidth Change the existing warning into a failure. No one reads warnings, and the shaping is unstable if ceiling < bandwidth. --- scripts/VyattaQosTrafficShaper.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/VyattaQosTrafficShaper.pm b/scripts/VyattaQosTrafficShaper.pm index b3a05a6..de6bb57 100644 --- a/scripts/VyattaQosTrafficShaper.pm +++ b/scripts/VyattaQosTrafficShaper.pm @@ -113,8 +113,7 @@ my $ceil = _getPercentRate($self->{_ceiling}, $limit); if (defined $ceil && $ceil < $rate) { - printf STDERR - "Warning: $level\nceiling %dKbps < class bandwidth %dKbps\n", + die "$level\nceiling %dKbps < class bandwidth %dKbps\n", $ceil / 1000, $rate / 1000; } } -- cgit v1.2.3