mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-07 16:24:01 +01:00
Revert "Allow leading 's' & 'd' to be omitted when specifying two rates"
This reverts commit 23bc6f1ab5
.
This commit is contained in:
parent
f0c75b5119
commit
cb3273b13b
@ -5350,17 +5350,8 @@ sub do_ratelimit( $$ ) {
|
||||
my @rates = split_list3 $rates, 'rate';
|
||||
|
||||
if ( @rates == 2 ) {
|
||||
if ( $rates[0] =~ m|^/\d+:| ) {
|
||||
$rates[0] = 's' . $rates[0];
|
||||
} else {
|
||||
$rates[0] = 's:' . $rates[0] unless $rates[0] =~ m|^s(?:/\d+)?:|;
|
||||
}
|
||||
|
||||
if ( $rates[1] =~ m|^/\d+:| ) {
|
||||
$rates[1] = 'd' . $rates[1];
|
||||
} else {
|
||||
$rates[1] = 'd:' . $rates[1] unless $rates[1] =~ m|^d(?:/\d+)?:|;
|
||||
}
|
||||
$rates[0] = 's:' . $rates[0] unless $rates[0] =~ /^s(?:\/\d+)?:/;
|
||||
$rates[1] = 'd:' . $rates[1] unless $rates[1] =~ /^d(?:\/\d+)?:/;
|
||||
} elsif ( @rates > 2 ) {
|
||||
fatal error "Only two rates may be specified";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user