From ff4fb210447e4dcfa497407cb7c7883441b27fdd Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Thu, 11 Apr 2013 18:29:45 -0700 Subject: [PATCH] Require that the '-j' part of a free-form rule be known. Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Rules.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Shorewall/Perl/Shorewall/Rules.pm b/Shorewall/Perl/Shorewall/Rules.pm index 77b10c365..ef1420738 100644 --- a/Shorewall/Perl/Shorewall/Rules.pm +++ b/Shorewall/Perl/Shorewall/Rules.pm @@ -2095,6 +2095,8 @@ sub process_rule ( $$$$$$$$$$$$$$$$$$$ ) { if ( $inline_matches =~ /^(.*\s+)-j\s+(.+)$/ ) { $matches .= $1; $action = $2; + my ( $target ) = split ' ', $action; + fatal_error "Unknown jump target ($action)" unless $targets{$target}; fatal_error "INLINE may not have a parameter when '-j' is specified in the free-form area" if $param ne ''; } else { $matches .= "$inline_matches ";