mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-08 22:58:50 +01:00
Rename 'policy_rules' to 'add_policy_rules'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
9649107a8e
commit
89877ed3f7
@ -714,7 +714,7 @@ sub process_policies()
|
|||||||
#
|
#
|
||||||
sub process_inline ($$$$$$$$$$$$$$$$$$$$$);
|
sub process_inline ($$$$$$$$$$$$$$$$$$$$$);
|
||||||
|
|
||||||
sub policy_rules( $$$$$ ) {
|
sub add_policy_rules( $$$$$ ) {
|
||||||
my ( $chainref , $target, $loglevel, $default, $dropmulticast ) = @_;
|
my ( $chainref , $target, $loglevel, $default, $dropmulticast ) = @_;
|
||||||
|
|
||||||
unless ( $target eq 'NONE' ) {
|
unless ( $target eq 'NONE' ) {
|
||||||
@ -785,20 +785,20 @@ sub complete_policy_chain( $$$ ) { #Chainref, Source Zone, Destination Zone
|
|||||||
assert( $policyref );
|
assert( $policyref );
|
||||||
|
|
||||||
if ( $chainref eq $policyref ) {
|
if ( $chainref eq $policyref ) {
|
||||||
policy_rules $chainref , $policy, $loglevel , $default, $config{MULTICAST};
|
add_policy_rules $chainref , $policy, $loglevel , $default, $config{MULTICAST};
|
||||||
} else {
|
} else {
|
||||||
if ( $policy eq 'ACCEPT' || $policy eq 'QUEUE' || $policy =~ /^NFQUEUE/ ) {
|
if ( $policy eq 'ACCEPT' || $policy eq 'QUEUE' || $policy =~ /^NFQUEUE/ ) {
|
||||||
if ( $synparams ) {
|
if ( $synparams ) {
|
||||||
report_syn_flood_protection;
|
report_syn_flood_protection;
|
||||||
policy_rules $chainref , $policy , $loglevel , $default, $config{MULTICAST};
|
add_policy_rules $chainref , $policy , $loglevel , $default, $config{MULTICAST};
|
||||||
} else {
|
} else {
|
||||||
add_ijump $chainref, g => $policyref;
|
add_ijump $chainref, g => $policyref;
|
||||||
$chainref = $policyref;
|
$chainref = $policyref;
|
||||||
policy_rules( $chainref, $policy, $loglevel, $default, $config{MULTICAST} ) if $default =~/^macro\./;
|
add_policy_rules( $chainref, $policy, $loglevel, $default, $config{MULTICAST} ) if $default =~/^macro\./;
|
||||||
}
|
}
|
||||||
} elsif ( $policy eq 'CONTINUE' ) {
|
} elsif ( $policy eq 'CONTINUE' ) {
|
||||||
report_syn_flood_protection if $synparams;
|
report_syn_flood_protection if $synparams;
|
||||||
policy_rules $chainref , $policy , $loglevel , $default, $config{MULTICAST};
|
add_policy_rules $chainref , $policy , $loglevel , $default, $config{MULTICAST};
|
||||||
} else {
|
} else {
|
||||||
report_syn_flood_protection if $synparams;
|
report_syn_flood_protection if $synparams;
|
||||||
add_ijump $chainref , g => $policyref;
|
add_ijump $chainref , g => $policyref;
|
||||||
@ -845,7 +845,7 @@ sub complete_policy_chains() {
|
|||||||
|
|
||||||
if ( $name =~ /^all[-2]|[-2]all$/ ) {
|
if ( $name =~ /^all[-2]|[-2]all$/ ) {
|
||||||
run_user_exit $chainref;
|
run_user_exit $chainref;
|
||||||
policy_rules $chainref , $policy, $loglevel , $default, $config{MULTICAST};
|
add_policy_rules $chainref , $policy, $loglevel , $default, $config{MULTICAST};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -890,7 +890,7 @@ sub complete_standard_chain ( $$$$ ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
policy_rules $stdchainref , $policy , $loglevel, $defaultaction, 0;
|
add_policy_rules $stdchainref , $policy , $loglevel, $defaultaction, 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user