mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-15 12:14:32 +01:00
Don't require '0x' on devnum > 10 in tcclasses
This commit is contained in:
parent
4300ef3ee2
commit
9a95bad17e
@ -748,7 +748,6 @@ sub dev_by_number( $ ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
( $dev , $devref );
|
( $dev , $devref );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub validate_tc_class( ) {
|
sub validate_tc_class( ) {
|
||||||
@ -764,7 +763,7 @@ sub validate_tc_class( ) {
|
|||||||
( $device, my ($number, $subnumber, $rest ) ) = split /:/, $device, 4;
|
( $device, my ($number, $subnumber, $rest ) ) = split /:/, $device, 4;
|
||||||
fatal_error "Invalid INTERFACE:CLASS ($devclass)" if defined $rest;
|
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 );
|
( $number , $classnumber ) = ( hex_value $device, hex_value $number );
|
||||||
( $device , $devref) = dev_by_number( $number );
|
( $device , $devref) = dev_by_number( $number );
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user