summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/VyattaQosUtil.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/VyattaQosUtil.pm b/scripts/VyattaQosUtil.pm
index 1d4a5e2..86b091a 100644
--- a/scripts/VyattaQosUtil.pm
+++ b/scripts/VyattaQosUtil.pm
@@ -129,7 +129,8 @@ sub getDsfield {
}
}
close($ds) or die "read $dsFileName error\n";
-
+
+ (defined $match) or die "\"$str\" unknown dsfield value\n";
return $match;
}
@@ -140,6 +141,7 @@ sub getIfIndex {
open my $sysfs, "<", "/sys/class/net/$str/ifindex" || die "Unknown interface $str\n";
my $ifindex = <$sysfs>;
close($sysfs) or die "read sysfs error\n";
+ chomp $ifindex;
return $ifindex;
}