Improve editing of TOS values -- Take 2

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6220 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-05-03 17:30:30 +00:00
parent 99d89a378a
commit c28cb4aad0

View File

@ -858,7 +858,7 @@ sub mac_match( $ ) {
# #
sub numeric_value ( $ ) { sub numeric_value ( $ ) {
my $mark = $_[0]; my $mark = $_[0];
fatal_error "Invalid Numeric Value" unless "\L$mark" =~ /^(0x[a-f0-9]+|0[0-7]*|[1-9]\d*)$/; fatal_error "Invalid Numeric Value ($mark)" unless "\L$mark" =~ /^(0x[a-f0-9]+|0[0-7]*|[1-9]\d*)$/;
$mark =~ /^0x/ ? hex $mark : $mark =~ /^0/ ? oct $mark : $mark; $mark =~ /^0x/ ? hex $mark : $mark =~ /^0/ ? oct $mark : $mark;
} }