forked from extern/shorewall_code
Add some comments and remove extra whitespace
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
215e923562
commit
ecd2e2276e
@ -788,7 +788,10 @@ sub format_rule( $$;$ ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Merge two rules.
|
# Merge two rules - If the target of the merged rule is a chain, a reference to its
|
||||||
|
# chain table entry is returned. It is the caller's responsibility
|
||||||
|
# to handle reference counting. If the target is a builtin, '' is
|
||||||
|
# returned.
|
||||||
#
|
#
|
||||||
sub merge_rules( $$$ ) {
|
sub merge_rules( $$$ ) {
|
||||||
my ( $tableref, $toref, $fromref ) = @_;
|
my ( $tableref, $toref, $fromref ) = @_;
|
||||||
@ -813,12 +816,11 @@ sub merge_rules( $$$ ) {
|
|||||||
|
|
||||||
set_rule_option( $toref, 'policy', $fromref->{policy} ) if exists $fromref->{policy};
|
set_rule_option( $toref, 'policy', $fromref->{policy} ) if exists $fromref->{policy};
|
||||||
|
|
||||||
|
|
||||||
unless ( $toref->{comment} ) {
|
unless ( $toref->{comment} ) {
|
||||||
$toref->{comment} = $fromref->{comment} if exists $fromref->{comment};
|
$toref->{comment} = $fromref->{comment} if exists $fromref->{comment};
|
||||||
}
|
}
|
||||||
|
|
||||||
$toref->{target} = $target;
|
$toref->{target} = $target;
|
||||||
|
|
||||||
if ( my $targetref = $tableref->{$target} ) {
|
if ( my $targetref = $tableref->{$target} ) {
|
||||||
return $targetref;
|
return $targetref;
|
||||||
@ -873,7 +875,7 @@ sub add_commands ( $$;@ ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Transform the passed rule and add it to the end of the passed chain's rule list
|
# Transform the passed rule and add it to the end of the passed chain's rule list.
|
||||||
#
|
#
|
||||||
sub push_rule( $$ ) {
|
sub push_rule( $$ ) {
|
||||||
my $chainref = $_[0];
|
my $chainref = $_[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user