summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Harpin <development@landsofshadow.co.uk>2015-02-09 07:23:15 +0000
committerAlex Harpin <development@landsofshadow.co.uk>2015-02-09 07:23:15 +0000
commitd73b3eed4a40f80e827fb9d4c0607976d783d73a (patch)
treeba9627c9eb5f52bfabf7353a74f5bef0d54f29b6
parent4ea9379c15f8fc93798b087f52acd0ad89faf553 (diff)
parent63ef189dd26c3993c4ad635418e7841f3bb1ed2f (diff)
downloadvyatta-op-qos-d73b3eed4a40f80e827fb9d4c0607976d783d73a.tar.gz
vyatta-op-qos-d73b3eed4a40f80e827fb9d4c0607976d783d73a.zip
Merge pull request #1 from kouak/lithium
"show queuing" update for 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());