Add hack to distinguish between the BLACKLIST macro and action

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2017-01-23 09:23:26 -08:00
parent 33b4ee4d31
commit 2bbb5c8c1e
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10
2 changed files with 9 additions and 1 deletions

View File

@ -2,6 +2,8 @@
# Shorewall -- /usr/share/shorewall/macro.blacklist
#
# This macro handles blacklisting using BLACKLIST_DISPOSITION and BLACKLIST_LOGLEVEL.
# It is usable only in the blrules file; in the rules file the action by the
# same name is invoked.
#
###############################################################################
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER

View File

@ -2736,7 +2736,13 @@ sub process_rule ( $$$$$$$$$$$$$$$$$$$$ ) {
#
# Determine the validity of the action
#
$actiontype = ( $targets{$basictarget} || find_macro ( $basictarget ) );
if ( $actiontype = $targets{$basictarget} ) {
if ( $section == BLACKLIST_SECTION && $basictarget eq 'BLACKLIST' ) {
assert( $actiontype = find_macro( 'BLACKLIST' ) );
}
} else {
$actiontype = find_macro ( $basictarget );
}
if ( $config{ MAPOLDACTIONS } ) {
( $basictarget, $actiontype , $param ) = map_old_actions( $basictarget ) unless $actiontype || supplied $param;