mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-25 20:22:12 +02:00
More state rule check fixes.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
c5dc69b750
commit
f1707d2ace
@ -2687,19 +2687,18 @@ sub check_state( $ ) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ( ( $state eq 'ESTABLISHED' ) ||
|
if ( ( $state eq 'ESTABLISHED' ) ||
|
||||||
( $state =~ /^(?:INVALID|UNTRACKED|RELATED)$/ && $globals{"${state}_DISPOSITION"} ) ) {
|
( $state =~ /^(?:INVALID|UNTRACKED|RELATED)$/ && $globals{"${state}_TARGET"} ) ) {
|
||||||
my $sections = $actparms{0}->{sections};
|
my $sectionref = $actparms{0}->{sections};
|
||||||
|
|
||||||
if ( $sections ) {
|
if ( $sectionref ) {
|
||||||
my $sectionnumber = ( $section_map{$state} || 0 );
|
return 0 if $sectionref->{$state};
|
||||||
return 0 if $sectionnumber & $sections;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $section & ( NEW_SECTION | DEFAULTACTION_SECTION ) ) {
|
if ( $section & ( NEW_SECTION | DEFAULTACTION_SECTION ) ) {
|
||||||
return ( $state =~ /^(?:INVALID|UNTRACKED|NEW)$/ );
|
return ( $state =~ /^(?:INVALID|UNTRACKED|NEW)$/ );
|
||||||
} else {
|
} else {
|
||||||
return 2 if $state eq $section_rmap{$section};
|
return $state eq $section_rmap{$section} ? 2 : 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user