From 5acf0f60e72a7b18e0e1cc259aa3b13c88a90760 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sun, 25 Nov 2012 10:17:03 -0800 Subject: [PATCH] Only apply log level to bare LOG rules in default-action macro. Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Rules.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Shorewall/Perl/Shorewall/Rules.pm b/Shorewall/Perl/Shorewall/Rules.pm index 45c66d888..2c45ec607 100644 --- a/Shorewall/Perl/Shorewall/Rules.pm +++ b/Shorewall/Perl/Shorewall/Rules.pm @@ -1656,7 +1656,11 @@ sub process_macro ($$$$$$$$$$$$$$$$$$$) { next; } - $mtarget = merge_levels $target, $mtarget; + unless ( $section eq 'DEFAULTACTION' ) { + $mtarget = merge_levels $target, $mtarget; + } else { + $mtarget = merge_levels( $target, $mtarget ) if $mtarget eq 'LOG'; + } if ( $mtarget =~ /^PARAM(:.*)?$/ ) { fatal_error 'PARAM requires a parameter to be supplied in macro invocation' unless $param ne '';