summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Vyatta/Qos/WeightedRandom.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Vyatta/Qos/WeightedRandom.pm b/lib/Vyatta/Qos/WeightedRandom.pm
index 9397299..6e30839 100644
--- a/lib/Vyatta/Qos/WeightedRandom.pm
+++ b/lib/Vyatta/Qos/WeightedRandom.pm
@@ -23,13 +23,14 @@ require Vyatta::Config;
require Vyatta::Qos::ShaperClass;
use Vyatta::Qos::Util qw/getRate getAutoRate/;
-my $wred = 'weighted-random-detect';
+my $wred = 'weighted-random';
# Create a new instance based on config information
sub new {
my ( $that, $config, $name ) = @_;
my $level = $config->setLevel();
my $rate = $config->returnValue("bandwidth");
+ die "$level bandwidth configuration missing" unless $rate;
my @classes = _getClasses($level);
@@ -111,8 +112,8 @@ sub commands {
my ( $qmin, $qmax, $burst ) = RedParam( $classbw, $latency, $avg );
- print "qdisc chang dev $dev root gred ";
- printf "limit %d min %d max %d avpkt %d", 4 * $qmax, $qmin, $qmax, $avg;
+ print "qdisc chang dev $dev root gred";
+ printf " limit %d min %d max %d avpkt %d", 4 * $qmax, $qmin, $qmax, $avg;
printf " burst %d probability 0.02 bandwidth %d ecn\n",
$burst, $classbw / 1000;