diff --git a/Shorewall-common/changelog.txt b/Shorewall-common/changelog.txt index 886859e87..79818b515 100644 --- a/Shorewall-common/changelog.txt +++ b/Shorewall-common/changelog.txt @@ -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. diff --git a/Shorewall-common/releasenotes.txt b/Shorewall-common/releasenotes.txt index 9645893cf..b05abdc71 100644 --- a/Shorewall-common/releasenotes.txt +++ b/Shorewall-common/releasenotes.txt @@ -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 diff --git a/Shorewall-perl/Shorewall/Chains.pm b/Shorewall-perl/Shorewall/Chains.pm index d47c2cf97..508b1ca3f 100644 --- a/Shorewall-perl/Shorewall/Chains.pm +++ b/Shorewall-perl/Shorewall/Chains.pm @@ -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)";