forked from extern/shorewall_code
Alter logging behavior of Limit
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
356d3fa2dd
commit
137d4bcc90
@ -36,7 +36,7 @@ my $chainref = get_action_chain;
|
||||
my @param = get_action_params(3);
|
||||
my ( $level, $tag ) = get_action_logging;
|
||||
|
||||
@param = split /,/, $tag unless supplied( join '', @param );
|
||||
@param = split( ',', $tag ), $tag = $param[0] unless supplied( join '', @param );
|
||||
|
||||
fatal_error 'Limit rules must include <set name>,<max connections>,<interval> as the log tag or as parameters' unless @param == 3;
|
||||
|
||||
@ -56,7 +56,7 @@ add_irule $chainref, recent => "--name $set --set";
|
||||
|
||||
if ( $level ne '' ) {
|
||||
my $xchainref = new_chain 'filter' , "$chainref->{name}%";
|
||||
log_irule_limit( $level, $xchainref, $param[0], 'DROP', [], $tag, 'add' , '' );
|
||||
log_irule_limit( $level, $xchainref, '', 'DROP', [], $tag, 'add' , '' );
|
||||
add_ijump $xchainref, j => 'DROP';
|
||||
add_ijump $chainref, j => $xchainref, recent => "--name $set --update --seconds $param[2] --hitcount $count";
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user