mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-16 03:10:39 +01:00
Restore the name 'process_rule1'
This commit is contained in:
parent
1bdaf862d3
commit
e0d2eb997d
@ -602,7 +602,7 @@ my %builtinops = ( 'dropBcast' => \&dropBcast,
|
|||||||
'forwardUPnP' => \&forwardUPnP,
|
'forwardUPnP' => \&forwardUPnP,
|
||||||
'Limit' => \&Limit, );
|
'Limit' => \&Limit, );
|
||||||
|
|
||||||
sub process_rule_common ( $$$$$$$$$$$$$$$$ );
|
sub process_rule1 ( $$$$$$$$$$$$$$$$ );
|
||||||
|
|
||||||
#
|
#
|
||||||
# Populate an action invocation chain. As new action tuples are encountered,
|
# Populate an action invocation chain. As new action tuples are encountered,
|
||||||
@ -652,22 +652,22 @@ sub process_action( $) {
|
|||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
process_rule_common( $chainref,
|
process_rule1( $chainref,
|
||||||
merge_levels( "$action:$level:$tag", $target ),
|
merge_levels( "$action:$level:$tag", $target ),
|
||||||
'',
|
'',
|
||||||
$source,
|
$source,
|
||||||
$dest,
|
$dest,
|
||||||
$proto,
|
$proto,
|
||||||
$ports,
|
$ports,
|
||||||
$sports,
|
$sports,
|
||||||
$origdest,
|
$origdest,
|
||||||
$rate,
|
$rate,
|
||||||
$user,
|
$user,
|
||||||
$mark,
|
$mark,
|
||||||
$connlimit,
|
$connlimit,
|
||||||
$time,
|
$time,
|
||||||
$headers,
|
$headers,
|
||||||
0 );
|
0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
clear_comment;
|
clear_comment;
|
||||||
@ -819,7 +819,7 @@ sub process_macro ( $$$$$$$$$$$$$$$$$ ) {
|
|||||||
$mdest = '';
|
$mdest = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$generated |= process_rule_common(
|
$generated |= process_rule1(
|
||||||
$chainref,
|
$chainref,
|
||||||
$mtarget,
|
$mtarget,
|
||||||
$param,
|
$param,
|
||||||
@ -856,7 +856,7 @@ sub process_macro ( $$$$$$$$$$$$$$$$$ ) {
|
|||||||
# Similarly, if a new action tuple is encountered, this function is called recursively for each rule in the action
|
# Similarly, if a new action tuple is encountered, this function is called recursively for each rule in the action
|
||||||
# body.
|
# body.
|
||||||
#
|
#
|
||||||
sub process_rule_common ( $$$$$$$$$$$$$$$$ ) {
|
sub process_rule1 ( $$$$$$$$$$$$$$$$ ) {
|
||||||
my ( $chainref, #reference to Action Chain if we are being called from process_action(); undef otherwise
|
my ( $chainref, #reference to Action Chain if we are being called from process_action(); undef otherwise
|
||||||
$target,
|
$target,
|
||||||
$current_param,
|
$current_param,
|
||||||
@ -899,7 +899,7 @@ sub process_rule_common ( $$$$$$$$$$$$$$$$ ) {
|
|||||||
|
|
||||||
if ( $actiontype == MACRO ) {
|
if ( $actiontype == MACRO ) {
|
||||||
#
|
#
|
||||||
# process_macro() will call process_rule_common() recursively for each rule in the macro body
|
# process_macro() will call process_rule1() recursively for each rule in the macro body
|
||||||
#
|
#
|
||||||
fatal_error "Macro invocations nested too deeply" if ++$macro_nest_level > MAX_MACRO_NEST_LEVEL;
|
fatal_error "Macro invocations nested too deeply" if ++$macro_nest_level > MAX_MACRO_NEST_LEVEL;
|
||||||
|
|
||||||
@ -1115,7 +1115,7 @@ sub process_rule_common ( $$$$$$$$$$$$$$$$ ) {
|
|||||||
#
|
#
|
||||||
# Handle Optimization
|
# Handle Optimization
|
||||||
#
|
#
|
||||||
if ( $optimize > 0 ) {
|
if ( $optimize & 1 ) {
|
||||||
my $loglevel = $filter_table->{$chainref->{policychain}}{loglevel};
|
my $loglevel = $filter_table->{$chainref->{policychain}}{loglevel};
|
||||||
if ( $loglevel ne '' ) {
|
if ( $loglevel ne '' ) {
|
||||||
return 0 if $target eq "${policy}:$loglevel}";
|
return 0 if $target eq "${policy}:$loglevel}";
|
||||||
@ -1559,22 +1559,22 @@ sub process_rule ( ) {
|
|||||||
my $destzone = (split( /:/, $dest, 2 ) )[0];
|
my $destzone = (split( /:/, $dest, 2 ) )[0];
|
||||||
$destzone = $action =~ /^REDIRECT/ ? $fw : '' unless defined_zone $destzone;
|
$destzone = $action =~ /^REDIRECT/ ? $fw : '' unless defined_zone $destzone;
|
||||||
if ( ! $wild || $intrazone || ( $sourcezone ne $destzone ) ) {
|
if ( ! $wild || $intrazone || ( $sourcezone ne $destzone ) ) {
|
||||||
$generated |= process_rule_common( undef,
|
$generated |= process_rule1( undef,
|
||||||
$target,
|
$target,
|
||||||
'',
|
'',
|
||||||
$source,
|
$source,
|
||||||
$dest,
|
$dest,
|
||||||
$proto,
|
$proto,
|
||||||
$ports,
|
$ports,
|
||||||
$sports,
|
$sports,
|
||||||
$origdest,
|
$origdest,
|
||||||
$ratelimit,
|
$ratelimit,
|
||||||
$user,
|
$user,
|
||||||
$mark,
|
$mark,
|
||||||
$connlimit,
|
$connlimit,
|
||||||
$time,
|
$time,
|
||||||
$headers,
|
$headers,
|
||||||
$wild );
|
$wild );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user