forked from extern/shorewall_code
Fix bad ruleset caused by empty action
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6207 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
94d324d01d
commit
14a243fa20
@ -384,6 +384,8 @@ sub process_action3( $$$$$ ) {
|
|||||||
my $actionfile = find_file "action.$action";
|
my $actionfile = find_file "action.$action";
|
||||||
my $standard = ( $actionfile =~ /^$globals{SHAREDIR}/ );
|
my $standard = ( $actionfile =~ /^$globals{SHAREDIR}/ );
|
||||||
|
|
||||||
|
mark_referenced $chainref; # Just in case the action body is empty.
|
||||||
|
|
||||||
fatal_error "Missing Action File: $actionfile" unless -f $actionfile;
|
fatal_error "Missing Action File: $actionfile" unless -f $actionfile;
|
||||||
|
|
||||||
progress_message2 "Processing $actionfile for chain $chainref->{name}...";
|
progress_message2 "Processing $actionfile for chain $chainref->{name}...";
|
||||||
|
@ -55,6 +55,7 @@ our @EXPORT = qw( STANDARD
|
|||||||
pop_cmd_mode
|
pop_cmd_mode
|
||||||
add_command
|
add_command
|
||||||
add_commands
|
add_commands
|
||||||
|
mark_referenced
|
||||||
add_file
|
add_file
|
||||||
add_rule
|
add_rule
|
||||||
insert_rule
|
insert_rule
|
||||||
@ -283,6 +284,11 @@ sub add_commands {
|
|||||||
$chainref->{referenced} = 1;
|
$chainref->{referenced} = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub mark_referenced( $ ) {
|
||||||
|
my $chainref = shift @_;
|
||||||
|
|
||||||
|
$chainref->{referenced} = 1;
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copy a file into a chain's rules as a set of run-time commands
|
# Copy a file into a chain's rules as a set of run-time commands
|
||||||
|
Loading…
Reference in New Issue
Block a user