mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-14 19:54:06 +01:00
Allow 'sec' as a valid unit of time in rate-limit specifications
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6998 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
283f489063
commit
0d6d0c1c0f
@ -21,6 +21,8 @@ Changes in 4.0.1
|
||||
|
||||
10) Cleaner way to handle quotes in rules.
|
||||
|
||||
11) Allow '/min' in RATE/BURST column.
|
||||
|
||||
Changes in 4.0.0 Final
|
||||
|
||||
1) Fix lite install.sh manpage problem.
|
||||
|
@ -78,6 +78,9 @@ Problems corrected in 4.0.1.
|
||||
actions and when a log level followed by '!' was used with any
|
||||
builtin actions.
|
||||
|
||||
10) Shorewall-perl was incorrectly rejecting 'min' as a valid unit of
|
||||
time in rate-limiting specifications.
|
||||
|
||||
Other changes in Shorewall 4.0.1.
|
||||
|
||||
1) A new EXPAND_POLICIES option is added to shorewall.conf. The
|
||||
|
@ -1046,9 +1046,9 @@ sub do_ratelimit( $$ ) {
|
||||
|
||||
fatal_error "Rate Limiting not available with $action" if $norate{$action};
|
||||
|
||||
if ( $rate =~ /^(\d+(\/(sec|hour|day))?):(\d+)$/ ) {
|
||||
if ( $rate =~ /^(\d+(\/(sec|min|hour|day))?):(\d+)$/ ) {
|
||||
"-m limit --limit $1 --limit-burst $4 ";
|
||||
} elsif ( $rate =~ /^(\d+)(\/(sec|hour|day))?$/ ) {
|
||||
} elsif ( $rate =~ /^(\d+)(\/(sec|min|hour|day))?$/ ) {
|
||||
"-m limit --limit $rate ";
|
||||
} else {
|
||||
fatal_error "Invalid rate ($rate)";
|
||||
|
Loading…
Reference in New Issue
Block a user