forked from extern/shorewall_code
Simplify checking for /! -[piosd] /
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
311372013d
commit
639b3ea57d
@ -659,6 +659,8 @@ sub add_jump( $$$;$$$ ) {
|
|||||||
|
|
||||||
my $param = $goto_ok && $toref && have_capability( 'GOTO_TARGET' ) ? 'g' : 'j';
|
my $param = $goto_ok && $toref && have_capability( 'GOTO_TARGET' ) ? 'g' : 'j';
|
||||||
|
|
||||||
|
$fromref->{dont_optimize} = 1 if $predicate =~ /! -[piosd] /;
|
||||||
|
|
||||||
if ( defined $index ) {
|
if ( defined $index ) {
|
||||||
assert( ! $expandports );
|
assert( ! $expandports );
|
||||||
insert_rule1( $fromref, $index, join( '', $predicate, "-$param $to" ));
|
insert_rule1( $fromref, $index, join( '', $predicate, "-$param $to" ));
|
||||||
@ -1752,9 +1754,7 @@ sub optimize_ruleset() {
|
|||||||
#
|
#
|
||||||
# Not so easy -- the rule contains matches
|
# Not so easy -- the rule contains matches
|
||||||
#
|
#
|
||||||
my ($matches, $target ) = ( $1, $2 );
|
if ( $chainref->{builtin} || ! have_capability 'KLUDGEFREE' ) {
|
||||||
|
|
||||||
if ( $chainref->{builtin} || ! have_capability 'KLUDGEFREE' || ( defined( $chain_table{$chainref->{table}}{$target} ) && $matches =~ /! -[piosd] / ) ) {
|
|
||||||
#
|
#
|
||||||
# This case requires a new rule merging algorithm. Ignore this chain for
|
# This case requires a new rule merging algorithm. Ignore this chain for
|
||||||
# now.
|
# now.
|
||||||
@ -1764,7 +1764,7 @@ sub optimize_ruleset() {
|
|||||||
#
|
#
|
||||||
# Replace references to this chain with the target and add the matches
|
# Replace references to this chain with the target and add the matches
|
||||||
#
|
#
|
||||||
replace_references1 $chainref, $target, $matches;
|
replace_references1 $chainref, $2, $1;
|
||||||
$progress = 1;
|
$progress = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user