Rename process_rule to process_raw_rule and process_rule1 to process_rule

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2013-01-29 10:13:48 -08:00
parent 61d8f704f9
commit 27c5e67632

View File

@ -55,7 +55,7 @@ our @EXPORT = qw(
perl_action_tcp_helper
);
our @EXPORT_OK = qw( initialize process_rule1 );
our @EXPORT_OK = qw( initialize process_rule );
our $VERSION = 'MODULEVERSION';
#
# Globals are documented in the initialize() function
@ -1670,11 +1670,11 @@ sub process_actions() {
}
sub process_rule1 ( $$$$$$$$$$$$$$$$$$$ );
sub process_rule ( $$$$$$$$$$$$$$$$$$$ );
#
# Populate an action invocation chain. As new action tuples are encountered,
# the function will be called recursively by process_rule1().
# the function will be called recursively by process_rule().
#
sub process_action($$) {
my ( $chainref, $caller ) = @_;
@ -1724,7 +1724,7 @@ sub process_action($$) {
fatal_error 'DEFAULTS only allowed in FORMAT-2 actions';
}
process_rule1( $chainref,
process_rule( $chainref,
'',
$nolog ? $target : merge_levels( join(':', @actparms{'chain','loglevel','logtag'}), $target ),
'',
@ -1867,7 +1867,7 @@ sub process_macro ($$$$$$$$$$$$$$$$$$$$) {
$mdest = '';
}
$generated |= process_rule1(
$generated |= process_rule(
$chainref,
$matches,
$mtarget,
@ -1986,7 +1986,7 @@ sub process_inline ($$$$$$$$$$$$$$$$$$$$$) {
$mdest = '';
}
$generated |= process_rule1(
$generated |= process_rule(
$chainref,
$matches,
$mtarget,
@ -2041,7 +2041,7 @@ sub verify_audit($;$$) {
# reference is also passed when rules are being generated during processing of a macro used as a default action.
#
sub process_rule1 ( $$$$$$$$$$$$$$$$$$$ ) {
sub process_rule ( $$$$$$$$$$$$$$$$$$$ ) {
my ( $chainref, #reference to Action Chain if we are being called from process_action(); undef otherwise
$rule, #Matches
$target,
@ -2091,7 +2091,7 @@ sub process_rule1 ( $$$$$$$$$$$$$$$$$$$ ) {
if ( $actiontype == MACRO ) {
#
# process_macro() will call process_rule1() recursively for each rule in the macro body
# process_macro() will call process_rule() recursively for each rule in the macro body
#
fatal_error "Macro/Inline invocations nested too deeply" if ++$macro_nest_level > MAX_MACRO_NEST_LEVEL;
@ -2438,7 +2438,7 @@ sub process_rule1 ( $$$$$$$$$$$$$$$$$$$ ) {
$action = $basictarget; # Remove params, if any, from $action.
} elsif ( $actiontype & INLINE ) {
#
# process_inline() will call process_rule1() recursively for each rule in the macro body
# process_inline() will call process_rule() recursively for each rule in the macro body
#
fatal_error "Macro/Inline invocations nested too deeply" if ++$macro_nest_level > MAX_MACRO_NEST_LEVEL;
@ -2665,13 +2665,13 @@ sub perl_action_helper($$) {
assert( $chainref );
if ( $inlines{$action} ) {
$result = &process_rule1( $chainref,
$result = &process_rule( $chainref,
$matches,
$target,
'', # CurrentParam
@columns );
} else {
$result = process_rule1( $chainref,
$result = process_rule( $chainref,
$matches,
$target,
'', # Current Param
@ -2714,7 +2714,7 @@ sub perl_action_tcp_helper($$) {
fatal_error "Invalid PROTO ($passedproto) for the $action action" unless $passedproto eq '-' || $passedproto eq 'tcp' || $passedproto eq '6';
$result = &process_rule1( $chainref,
$result = &process_rule( $chainref,
$proto,
$target,
'',
@ -2723,7 +2723,7 @@ sub perl_action_tcp_helper($$) {
@columns[3..14]
);
} else {
$result = process_rule1( $chainref,
$result = process_rule( $chainref,
$proto,
$target,
'', # Current Param
@ -2751,7 +2751,7 @@ sub perl_action_tcp_helper($$) {
}
#
# Helper functions for process_rule(). That function deals with the ugliness of wildcard zones ('all' and 'any') and zone lists.
# Helper functions for process_raw_rule(). That function deals with the ugliness of wildcard zones ('all' and 'any') and zone lists.
#
# Process a SECTION header
#
@ -2852,7 +2852,7 @@ sub build_zone_list( $$$\$\$ ) {
#
# Process a Record in the rules file
#
sub process_rule ( ) {
sub process_raw_rule ( ) {
my ( $target, $source, $dest, $protos, $ports, $sports, $origdest, $ratelimit, $users, $mark, $connlimit, $time, $headers, $condition, $helper )
= split_line1 'rules file', \%rulecolumns, $rule_commands;
@ -2895,7 +2895,7 @@ sub process_rule ( ) {
if ( ! $wild || $intrazone || ( $sourcezone ne $destzone ) ) {
for my $proto ( @protos ) {
for my $user ( @users ) {
if ( process_rule1( undef,
if ( process_rule( undef,
'',
$target,
'',
@ -3037,7 +3037,7 @@ sub process_rules( $ ) {
}
);
process_rule while read_a_line( NORMAL_READ );
process_raw_rule while read_a_line( NORMAL_READ );
}
$section = NULL_SECTION;
@ -3055,7 +3055,7 @@ sub process_rules( $ ) {
first_entry "$doing $fn...";
process_rule while read_a_line( NORMAL_READ );
process_raw_rule while read_a_line( NORMAL_READ );
}
#
# No need to finish the NEW section since no rules need to be generated