mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-08 16:54:10 +01:00
Smarten up action.Drop and action.Reject WRT omitted parameters
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
a5167dcd28
commit
000268f50c
@ -42,10 +42,10 @@ use Shorewall::Config;
|
|||||||
my ( $p1, $p2, $p3 , $p4, $p5 ) = get_action_params( 5 );
|
my ( $p1, $p2, $p3 , $p4, $p5 ) = get_action_params( 5 );
|
||||||
|
|
||||||
if ( defined $p1 && $p1 eq 'audit' ) {
|
if ( defined $p1 && $p1 eq 'audit' ) {
|
||||||
set_action_param( 2, 'A_REJECT') unless supplied $p2;
|
set_action_param( 2, 'A_REJECT') unless defined( $p2 ) && $p2 ne '-';
|
||||||
set_action_param( 3, 'A_DROP') unless supplied $p3;
|
set_action_param( 3, 'A_DROP') unless defined( $p3 ) && $p3 ne '-';
|
||||||
set_action_param( 4, 'A_ACCEPT' ) unless supplied $p4;
|
set_action_param( 4, 'A_ACCEPT' ) unless defined( $p4 ) && $p4 ne '-';
|
||||||
set_action_param( 5, 'A_DROP' ) unless supplied $p5;
|
set_action_param( 5, 'A_DROP' ) unless defined( $p5 ) && $p5 ne '-';
|
||||||
};
|
};
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@ -38,10 +38,10 @@ use Shorewall::Config;
|
|||||||
my ( $p1, $p2, $p3, $p4, $p5 ) = get_action_params( 5 );
|
my ( $p1, $p2, $p3, $p4, $p5 ) = get_action_params( 5 );
|
||||||
|
|
||||||
if ( defined $p1 && $p1 eq 'audit' ) {
|
if ( defined $p1 && $p1 eq 'audit' ) {
|
||||||
set_action_param( 2, 'A_REJECT') unless supplied $p2;
|
set_action_param( 2, 'A_REJECT') unless defined( $p2 ) && $p2 ne '-';
|
||||||
set_action_param( 3, 'A_REJECT') unless supplied $p3;
|
set_action_param( 3, 'A_REJECT') unless defined( $p3 ) && $p3 ne '-';
|
||||||
set_action_param( 4, 'A_ACCEPT' ) unless supplied $p5;
|
set_action_param( 4, 'A_ACCEPT' ) unless defined( $p5 ) && $p4 ne '-';
|
||||||
set_action_param( 5, 'A_DROP' ) unless supplied $p5;
|
set_action_param( 5, 'A_DROP' ) unless defined( $p5 ) && $p5 ne '-';
|
||||||
};
|
};
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
Loading…
Reference in New Issue
Block a user