mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-20 01:37:59 +02:00
Better handling of the matches rule member.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
ef01748dc9
commit
938bd72844
@ -812,6 +812,7 @@ sub set_rule_option( $$$ ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
push @{$ruleref->{$option}}, ( reftype $value ? @$value : $value );
|
push @{$ruleref->{$option}}, ( reftype $value ? @$value : $value );
|
||||||
|
push @{$ruleref->{matches}}, $option;
|
||||||
} else {
|
} else {
|
||||||
assert( ! reftype $value );
|
assert( ! reftype $value );
|
||||||
$ruleref->{$option} = join(' ', $value1, $value ) unless $value1 eq $value;
|
$ruleref->{$option} = join(' ', $value1, $value ) unless $value1 eq $value;
|
||||||
@ -834,10 +835,9 @@ sub set_rule_option( $$$ ) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$ruleref->{$option} = $value;
|
$ruleref->{$option} = $value;
|
||||||
}
|
|
||||||
|
|
||||||
push @{$ruleref->{matches}}, $option;
|
push @{$ruleref->{matches}}, $option;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sub transform_rule( $;\$ ) {
|
sub transform_rule( $;\$ ) {
|
||||||
my ( $input, $completeref ) = @_;
|
my ( $input, $completeref ) = @_;
|
||||||
@ -1330,15 +1330,16 @@ sub push_matches {
|
|||||||
if ( $globals{KLUDGEFREE} ) {
|
if ( $globals{KLUDGEFREE} ) {
|
||||||
$ruleref->{$option} = [ $curvalue ] unless reftype $curvalue;
|
$ruleref->{$option} = [ $curvalue ] unless reftype $curvalue;
|
||||||
push @{$ruleref->{$option}}, reftype $value ? @$value : $value;
|
push @{$ruleref->{$option}}, reftype $value ? @$value : $value;
|
||||||
|
push @{$ruleref->{matches}}, $option;
|
||||||
} else {
|
} else {
|
||||||
$ruleref->{$option} = join( '', $curvalue, $value );
|
$ruleref->{$option} = join( '', $curvalue, $value );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$ruleref->{$option} = $value;
|
$ruleref->{$option} = $value;
|
||||||
$dont_optimize ||= $option =~ /^[piosd]$/ && $value =~ /^!/;
|
$dont_optimize ||= $option =~ /^[piosd]$/ && $value =~ /^!/;
|
||||||
|
push @{$ruleref->{matches}}, $option;
|
||||||
}
|
}
|
||||||
|
|
||||||
push @{$ruleref->{matches}}, $option;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DONT_OPTIMIZE if $dont_optimize;
|
DONT_OPTIMIZE if $dont_optimize;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user