From 668759edad74675efcf6066785b24dc98a4958c3 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sun, 4 Jan 2015 11:09:39 -0800 Subject: [PATCH] Catch parameter problems with TARPIT Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Rules.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Shorewall/Perl/Shorewall/Rules.pm b/Shorewall/Perl/Shorewall/Rules.pm index 1cecd812c..a45aeb78e 100644 --- a/Shorewall/Perl/Shorewall/Rules.pm +++ b/Shorewall/Perl/Shorewall/Rules.pm @@ -2405,10 +2405,12 @@ sub process_rule ( $$$$$$$$$$$$$$$$$$$ ) { fatal_error "TARPIT is only valid with PROTO tcp (6)" if ( resolve_proto( $proto ) || 0 ) != TCP; - if ( $param ) { + if ( supplied $param ) { fatal_error "TARPIT Parameter must be 'tarpit', 'honeypot' or 'reset'" unless $param =~ /^(tarpit|honeypot|reset)$/; $action = "TARPIT --$param"; $log_action = 'TARPIT'; + } else { + $action = $log_action = 'TARPIT'; } $exceptionrule = '-p 6 ';