diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-06-10 14:25:14 -0700 |
---|---|---|
committer | Stephen Hemminger <shemminger@lenny.localdomain> | 2009-10-01 13:51:19 -0700 |
commit | 969064d17f9cc50a68e2922ec30ec5bb63b31763 (patch) | |
tree | 915d2ee0fb54b8c03be129cfd559dc0681da3ab4 /lib/Vyatta/Qos/ShaperClass.pm | |
parent | 6cf4217e392eb4c0956804b1ba66874de68fbd5e (diff) | |
download | vyatta-cfg-qos-969064d17f9cc50a68e2922ec30ec5bb63b31763.tar.gz vyatta-cfg-qos-969064d17f9cc50a68e2922ec30ec5bb63b31763.zip |
Handle round-robin without configuration of default
If default class is not configured Qos.
Bug 4529
(cherry picked from commit 0df90b28ca6d9cb6ae4f5267ef8522ac12a0c352)
Diffstat (limited to 'lib/Vyatta/Qos/ShaperClass.pm')
-rw-r--r-- | lib/Vyatta/Qos/ShaperClass.pm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/Vyatta/Qos/ShaperClass.pm b/lib/Vyatta/Qos/ShaperClass.pm index ef18f30..361eb57 100644 --- a/lib/Vyatta/Qos/ShaperClass.pm +++ b/lib/Vyatta/Qos/ShaperClass.pm @@ -209,11 +209,15 @@ sub gen_class { sub gen_leaf { my ( $self, $dev, $parent, $rate ) = @_; + my $qtype = $self->{_qdisc}; + return unless $qtype; # default is okay - printf "qdisc add dev %s parent %x:%x ", $dev, $parent, $self->{id}; + my $q = $qdiscOptions{$qtype}; + die "Unknown queue-type $qtype\n" + unless $q; - my $q = $qdiscOptions{ $self->{_qdisc} }; - $q->( $self, $dev, $rate ) if ($q); + printf "qdisc add dev %s parent %x:%x ", $dev, $parent, $self->{id}; + $q->( $self, $dev, $rate ); } sub dsmarkClass { |