Fix rate limiting

- Avoid specifying a timeout when the match is '-m limit'

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2018-07-15 08:57:43 -07:00
parent 474604b1fe
commit 0685d0edfd
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10

View File

@ -5444,8 +5444,10 @@ sub do_ratelimit( $$ ) {
$limit .= " --hashlimit-htable-size $htsize --hashlimit-htable-max $max";
}
$limit .= " --hashlimit-mode $mode" if $mode;
$units = $10;
if ( $mode ) {
$limit .= " --hashlimit-mode $mode";
$units = $10;
}
} else {
fatal_error "Invalid rate ($rate)";
}