summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkouak <kouak@kouak.org>2015-01-06 23:49:42 +0100
committerkouak <kouak@kouak.org>2015-01-06 23:49:42 +0100
commit63ef189dd26c3993c4ad635418e7841f3bb1ed2f (patch)
tree495bf8a925f4385abf53c6b050b502a9d3e621e9
parent69e9718bae4a533ea133451a7828cf8e1b2380f4 (diff)
downloadvyatta-op-qos-63ef189dd26c3993c4ad635418e7841f3bb1ed2f.tar.gz
vyatta-op-qos-63ef189dd26c3993c4ad635418e7841f3bb1ed2f.zip
HFSC scheduler (#428)
-rwxr-xr-xscripts/vyatta-show-queueing.pl9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/vyatta-show-queueing.pl b/scripts/vyatta-show-queueing.pl
index bbaa9f1..9d86579 100755
--- a/scripts/vyatta-show-queueing.pl
+++ b/scripts/vyatta-show-queueing.pl
@@ -120,6 +120,12 @@ sub byclassid {
my ( $a1, $a2 ) = ( $a =~ m/([0-9a-f]+):([0-9a-f]+)/ );
my ( $b1, $b2 ) = ( $b =~ m/([0-9a-f]+):([0-9a-f]+)/ );
+ # Gracefully handle 'X:' classes
+ if(!defined $a1) { $a1 = '0'; }
+ if(!defined $a2) { $a2 = '0'; }
+ if(!defined $b1) { $b1 = '0'; }
+ if(!defined $b2) { $b2 = '0'; }
+
if ($a1 eq $b1) {
return hex($a2) <=> hex($b2);
} else {
@@ -340,6 +346,9 @@ sub show_queues {
my $qid = qminor($class->{id});
$qid = 'default' if (defined($default) && $qid == $default);
+ # Return if said class has no leaf queue
+ return unless defined($class->{leaf}) && defined($qdisc->[$class->{leaf}]);
+
my $subq = $qdisc->[$class->{leaf}];
print_info($qid, $subq->{name}, $class, $node->getDepth());