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-htable-size $htsize --hashlimit-htable-max $max";
} }
$limit .= " --hashlimit-mode $mode" if $mode; if ( $mode ) {
$limit .= " --hashlimit-mode $mode";
$units = $10; $units = $10;
}
} else { } else {
fatal_error "Invalid rate ($rate)"; fatal_error "Invalid rate ($rate)";
} }