forked from extern/shorewall_code
Don't allow rates > full
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8439 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
7240cd1e9b
commit
8985536d4b
@ -401,12 +401,15 @@ sub convert_rate( $$ ) {
|
||||
|
||||
if ( $rate =~ /\bfull\b/ ) {
|
||||
$rate =~ s/\bfull\b/$full/g;
|
||||
progress_message " Compiling $_[1]";
|
||||
$rate = eval "int( $rate )";
|
||||
fatal_error "Invalid Rate ($_[1])" unless defined $rate;
|
||||
} else {
|
||||
$rate = rate_to_kbit $rate
|
||||
}
|
||||
|
||||
fatal_error "Invalid Rate ($_[1])" if $rate > $full;
|
||||
|
||||
"${rate}kbit";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user