mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-23 16:13:18 +01:00
Normalize rules prior to combine_state tests.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
f1707d2ace
commit
475942deb9
@ -3557,9 +3557,14 @@ sub delete_duplicates {
|
||||
# Get the 'conntrack' state for the passed rule reference
|
||||
#
|
||||
sub get_conntrack( $ ) {
|
||||
if ( my $states = $_[0]->{conntrack} ) {
|
||||
my $ruleref = $_[0];
|
||||
if ( my $states = $ruleref->{conntrack} ) {
|
||||
unless ( reftype $states ) {
|
||||
return $states if $states =~ s/--ctstate //;
|
||||
if ( $states =~ s/--ctstate // ) {
|
||||
delete $ruleref->{targetopts} unless $ruleref->{targetopts};
|
||||
$ruleref->{simple} = '' unless $ruleref->{simple};
|
||||
return $states
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3632,12 +3637,6 @@ sub combine_states {
|
||||
last RULE unless compare_values( $baseref->{$key}, $ruleref->{$key} );
|
||||
}
|
||||
|
||||
#
|
||||
# The rules connection tracking states must be different; otherwise,
|
||||
# the rules are identical
|
||||
#
|
||||
assert( $conntrack1 ne $conntrack2 );
|
||||
|
||||
if ( $comment2 ) {
|
||||
if ( $comment ) {
|
||||
$comment .= ", $comment2" unless $comment2 eq $lastcomment;
|
||||
|
Loading…
Reference in New Issue
Block a user