mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-22 15:43:30 +01:00
Correct handling of netmask when two rates are specified in the RATE col.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
f65b10c375
commit
61ac08dc7f
@ -5350,8 +5350,8 @@ sub do_ratelimit( $$ ) {
|
||||
my @rates = split_list3 $rates, 'rate';
|
||||
|
||||
if ( @rates == 2 ) {
|
||||
$rates[0] = 's:' . $rates[0] unless $rates[0] =~ /^s:/;
|
||||
$rates[1] = 'd:' . $rates[1] unless $rates[1] =~ /^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