From 1ffc4ece340bcf81d53c2910e291398c20465ff3 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 2 May 2011 16:29:12 -0700 Subject: [PATCH] Don't require '0x' on devnum > 10 in tcclasses --- Shorewall/Perl/Shorewall/Tc.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Tc.pm b/Shorewall/Perl/Shorewall/Tc.pm index a45a09868..fc0de67a2 100644 --- a/Shorewall/Perl/Shorewall/Tc.pm +++ b/Shorewall/Perl/Shorewall/Tc.pm @@ -748,7 +748,6 @@ sub dev_by_number( $ ) { } ( $dev , $devref ); - } sub validate_tc_class( ) { @@ -764,7 +763,7 @@ sub validate_tc_class( ) { ( $device, my ($number, $subnumber, $rest ) ) = split /:/, $device, 4; fatal_error "Invalid INTERFACE:CLASS ($devclass)" if defined $rest; - if ( $device =~ /^(\d+|0x[\da-fA-F]+)$/ ) { + if ( $device =~ /^(\d+|0x[\da-fA-F]+)$/ || ( $device =~ /^[\da-fA-F]+$/ && ! $tcdevices{$device} ) ) { ( $number , $classnumber ) = ( hex_value $device, hex_value $number ); ( $device , $devref) = dev_by_number( $number ); } else {