forked from extern/shorewall_code
More log level changes
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6113 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
3a67b4f76c
commit
140dd95130
@ -462,6 +462,7 @@ sub new_chain($$)
|
|||||||
$ch{log} = 1 if $globals{LOGRULENUMBERS};
|
$ch{log} = 1 if $globals{LOGRULENUMBERS};
|
||||||
$ch{rules} = [];
|
$ch{rules} = [];
|
||||||
$ch{table} = $table;
|
$ch{table} = $table;
|
||||||
|
$ch{loglevel} = '';
|
||||||
$chain_table{$table}{$chain} = \%ch;
|
$chain_table{$table}{$chain} = \%ch;
|
||||||
\%ch;
|
\%ch;
|
||||||
}
|
}
|
||||||
|
@ -205,7 +205,7 @@ sub validate_policy()
|
|||||||
push @policy_chains, ( $chainref );
|
push @policy_chains, ( $chainref );
|
||||||
}
|
}
|
||||||
|
|
||||||
$chainref->{loglevel} = $loglevel if $loglevel;
|
$chainref->{loglevel} = $loglevel if defined $loglevel && $loglevel ne '';
|
||||||
$chainref->{synparams} = $synparams if $synparams;
|
$chainref->{synparams} = $synparams if $synparams;
|
||||||
$chainref->{default} = $default if $default;
|
$chainref->{default} = $default if $default;
|
||||||
|
|
||||||
@ -243,7 +243,7 @@ sub policy_rules( $$$$ ) {
|
|||||||
|
|
||||||
add_rule $chainref, "-j $default" if $default && $default ne 'none';
|
add_rule $chainref, "-j $default" if $default && $default ne 'none';
|
||||||
|
|
||||||
log_rule $loglevel , $chainref , $target , '' if $loglevel;
|
log_rule $loglevel , $chainref , $target , '' if $loglevel ne '';
|
||||||
|
|
||||||
fatal_error "Null target in policy_rules()" unless $target;
|
fatal_error "Null target in policy_rules()" unless $target;
|
||||||
|
|
||||||
|
@ -249,7 +249,7 @@ sub setup_syn_flood_chains() {
|
|||||||
my $synchainref = new_chain 'filter' , syn_chain $chainref->{name};
|
my $synchainref = new_chain 'filter' , syn_chain $chainref->{name};
|
||||||
add_rule $synchainref , "-m limit --limit $limit ${burst}-j RETURN";
|
add_rule $synchainref , "-m limit --limit $limit ${burst}-j RETURN";
|
||||||
log_rule_limit $level , $synchainref , $chainref->{name} , 'DROP', '-m limit --limit 5/min --limit-burst 5' , '' , 'add' , ''
|
log_rule_limit $level , $synchainref , $chainref->{name} , 'DROP', '-m limit --limit 5/min --limit-burst 5' , '' , 'add' , ''
|
||||||
if defined $level && $level ne '';
|
if $level ne '';
|
||||||
add_rule $synchainref, '-j DROP';
|
add_rule $synchainref, '-j DROP';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1171,7 +1171,7 @@ sub process_rule ( $$$$$$$$$ ) {
|
|||||||
if ( ( ( my $policy ) = $policychainref->{policy} ) ne 'NONE' ) {
|
if ( ( ( my $policy ) = $policychainref->{policy} ) ne 'NONE' ) {
|
||||||
if ( $optimize > 0 ) {
|
if ( $optimize > 0 ) {
|
||||||
my $loglevel = $policychainref->{loglevel};
|
my $loglevel = $policychainref->{loglevel};
|
||||||
if ( defined $loglevel && $loglevel ne '' ) {
|
if ( $loglevel ne '' ) {
|
||||||
next if $target eq "${policy}:$loglevel}";
|
next if $target eq "${policy}:$loglevel}";
|
||||||
} else {
|
} else {
|
||||||
next if $action eq $policy;
|
next if $action eq $policy;
|
||||||
@ -1191,7 +1191,7 @@ sub process_rule ( $$$$$$$$$ ) {
|
|||||||
if ( ( ( my $policy ) = $policychainref->{policy} ) ne 'NONE' ) {
|
if ( ( ( my $policy ) = $policychainref->{policy} ) ne 'NONE' ) {
|
||||||
if ( $optimize > 0 ) {
|
if ( $optimize > 0 ) {
|
||||||
my $loglevel = $policychainref->{loglevel};
|
my $loglevel = $policychainref->{loglevel};
|
||||||
if ( defined $loglevel && $loglevel ne '') {
|
if ( $loglevel ne '') {
|
||||||
next if $target eq "${policy}:$loglevel}";
|
next if $target eq "${policy}:$loglevel}";
|
||||||
} else {
|
} else {
|
||||||
next if $action eq $policy;
|
next if $action eq $policy;
|
||||||
@ -1212,7 +1212,7 @@ sub process_rule ( $$$$$$$$$ ) {
|
|||||||
if ( ( ( my $policy ) = $policychainref->{policy} ) ne 'NONE' ) {
|
if ( ( ( my $policy ) = $policychainref->{policy} ) ne 'NONE' ) {
|
||||||
if ( $optimize > 0 ) {
|
if ( $optimize > 0 ) {
|
||||||
my $loglevel = $policychainref->{loglevel};
|
my $loglevel = $policychainref->{loglevel};
|
||||||
if ( defined $loglevel && $loglevel ne '' ) {
|
if ( $loglevel ne '' ) {
|
||||||
next if $target eq "${policy}:$loglevel}";
|
next if $target eq "${policy}:$loglevel}";
|
||||||
} else {
|
} else {
|
||||||
next if $action eq $policy;
|
next if $action eq $policy;
|
||||||
|
Loading…
Reference in New Issue
Block a user