Express mark test mask in Hex

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@7984 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2008-01-01 17:47:58 +00:00
parent 1a24a6fe78
commit 36096dfff7
2 changed files with 6 additions and 1 deletions

View File

@ -1152,7 +1152,7 @@ sub do_test ( $$ )
validate_mark $testval;
$testval = join('/', $testval, $mask ) unless ( $testval =~ '/' );
$testval = join('/', $testval, in_hex($mask) ) unless ( $testval =~ '/' );
"$match $testval ";
}

View File

@ -55,6 +55,7 @@ our @EXPORT_OK = qw( $shorewall_dir initialize read_a_line1 set_config_path shor
our %EXPORT_TAGS = ( internal => [ qw( create_temp_object
finalize_object
numeric_value
in_hex
emit
emit_unindented
save_progress_message
@ -510,6 +511,10 @@ sub numeric_value ( $ ) {
$mark =~ /^0/ ? oct $mark : $mark;
}
sub in_hex( $ ) {
sprintf '0x%x', $_[0];
}
#
# Write the arguments to the object file (if any) with the current indentation.
#