Correct patch for > 9 interfaces with tcfilters

This commit is contained in:
Tom Eastep 2011-05-02 09:52:31 -07:00
parent 46e2a02fe4
commit 453eba2f54
2 changed files with 10 additions and 1 deletions

View File

@ -61,6 +61,7 @@ our %EXPORT_TAGS = ( internal => [ qw( create_temp_script
disable_script disable_script
numeric_value numeric_value
numeric_value1 numeric_value1
normalize_hex
hex_value hex_value
in_hex in_hex
in_hex2 in_hex2
@ -811,6 +812,14 @@ sub numeric_value1 ( $ ) {
use warnings; use warnings;
} }
sub normalize_hex( $ ) {
my $val = shift;
$val =~ s/^0x//;
$val =~ s/^0// while length $val > 1;
$val;
}
sub hex_value( $ ) { sub hex_value( $ ) {
my $val = lc $_[0]; my $val = lc $_[0];
$val =~ s/^0x//; $val =~ s/^0x//;

View File

@ -981,7 +981,7 @@ sub process_tc_filter() {
( $device , my $devref ) = dev_by_number( $device ); ( $device , my $devref ) = dev_by_number( $device );
my $devnum = in_hex $devref->{number}; my $devnum = in_hexp $devref->{number};
my $tcref = $tcclasses{$device}; my $tcref = $tcclasses{$device};