Catch parameter problems with TARPIT

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2015-01-04 11:09:39 -08:00
parent 0f1f54b57b
commit 668759edad

View File

@ -2405,10 +2405,12 @@ sub process_rule ( $$$$$$$$$$$$$$$$$$$ ) {
fatal_error "TARPIT is only valid with PROTO tcp (6)" if ( resolve_proto( $proto ) || 0 ) != TCP; 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)$/; fatal_error "TARPIT Parameter must be 'tarpit', 'honeypot' or 'reset'" unless $param =~ /^(tarpit|honeypot|reset)$/;
$action = "TARPIT --$param"; $action = "TARPIT --$param";
$log_action = 'TARPIT'; $log_action = 'TARPIT';
} else {
$action = $log_action = 'TARPIT';
} }
$exceptionrule = '-p 6 '; $exceptionrule = '-p 6 ';