forked from extern/shorewall_code
Catch absurd MARK contents
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8430 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
aee1f94ce4
commit
c7db0435eb
@ -1231,11 +1231,17 @@ sub do_test ( $$ )
|
|||||||
{
|
{
|
||||||
my ($testval, $mask) = @_;
|
my ($testval, $mask) = @_;
|
||||||
|
|
||||||
|
my $originaltestval = $testval;
|
||||||
|
|
||||||
return '' unless defined $testval and $testval ne '-';
|
return '' unless defined $testval and $testval ne '-';
|
||||||
|
|
||||||
|
$mask = '' unless defined $mask;
|
||||||
|
|
||||||
my $invert = $testval =~ s/^!// ? '! ' : '';
|
my $invert = $testval =~ s/^!// ? '! ' : '';
|
||||||
my $match = $testval =~ s/:C$// ? "-m connmark ${invert}--mark" : "-m mark ${invert}--mark";
|
my $match = $testval =~ s/:C$// ? "-m connmark ${invert}--mark" : "-m mark ${invert}--mark";
|
||||||
|
|
||||||
|
fatal_error "Invalid MARK value ($originaltestval)" if $testval eq '/';
|
||||||
|
|
||||||
validate_mark $testval;
|
validate_mark $testval;
|
||||||
|
|
||||||
$testval = join( '/', $testval, in_hex($mask) ) unless ( $testval =~ '/' );
|
$testval = join( '/', $testval, in_hex($mask) ) unless ( $testval =~ '/' );
|
||||||
|
Loading…
Reference in New Issue
Block a user