diff --git a/Shorewall/Macros/macro.NFLOG b/Shorewall/Macros/macro.NFLOG new file mode 100644 index 000000000..7a3b05ab0 --- /dev/null +++ b/Shorewall/Macros/macro.NFLOG @@ -0,0 +1,14 @@ +# +# Shorewall version 4 - NFLOG Macro +# +# /usr/share/shorewall/macro.NFLOG +# +# This macro handles the NFLOG Target. +# +############################################################################### +#ACTION SOURCE DEST PROTO DEST SOURCE RATE USER/ +# PORT(S) PORT(S) LIMIT GROUP + +FORMAT 2 +DEFAULT 0 +LOG& diff --git a/Shorewall/Perl/Shorewall/Rules.pm b/Shorewall/Perl/Shorewall/Rules.pm index a1aa5d518..cdcaaa136 100644 --- a/Shorewall/Perl/Shorewall/Rules.pm +++ b/Shorewall/Perl/Shorewall/Rules.pm @@ -1588,6 +1588,11 @@ sub process_macro ( $$$$$$$$$$$$$$$$$$$) { $mtarget = substitute_param $param, $mtarget; } + if ( $mtarget =~ s/&$// ) { + fatal_error "$mtarget& requires a parameter to be supplied in macro invocation" unless $param ne ''; + $mtarget = "$mtarget:$macro($param)"; + } + my $action = isolate_basic_target $mtarget; fatal_error "Invalid or missing ACTION ($mtarget)" unless defined $action;