From 65e1b1c9e75cddc3bf62e917a9004300a5d6530d Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sun, 18 Nov 2012 13:13:43 -0800 Subject: [PATCH] Allow NFLOG as a target Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Rules.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Shorewall/Perl/Shorewall/Rules.pm b/Shorewall/Perl/Shorewall/Rules.pm index 68dc1c010..a1aa5d518 100644 --- a/Shorewall/Perl/Shorewall/Rules.pm +++ b/Shorewall/Perl/Shorewall/Rules.pm @@ -1714,6 +1714,16 @@ sub process_rule1 ( $$$$$$$$$$$$$$$$$$ ) { ( $basictarget, $actiontype , $param ) = map_old_actions( $basictarget ) unless $actiontype || $param; } + unless ( $actiontype ) { + if ( $action =~ /^NFLOG\(?/ ) { + $basictarget = 'LOG'; + $actiontype = $targets{LOG}; + fatal_error "Invalid NFLOG action($action:$loglevel)" if $loglevel; + $loglevel = supplied $param ? "NFLOG($param)" : 'NFLOG'; + $param = ''; + } + } + fatal_error "Unknown ACTION ($action)" unless $actiontype; if ( $actiontype == MACRO ) {