Allow NFLOG as a target

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-11-18 13:13:43 -08:00
parent 9dac330756
commit a07cfb0885

View File

@ -1714,6 +1714,16 @@ sub process_rule1 ( $$$$$$$$$$$$$$$$$$ ) {
( $basictarget, $actiontype , $param ) = map_old_actions( $basictarget ) unless $actiontype || $param; ( $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; fatal_error "Unknown ACTION ($action)" unless $actiontype;
if ( $actiontype == MACRO ) { if ( $actiontype == MACRO ) {