1
0
mirror of https://gitlab.com/shorewall/code.git synced 2024-12-19 21:01:20 +01:00

Complain if a RED_NONE option has a value specified.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-06-16 15:51:20 -07:00
parent 2807502836
commit 4c10fcd503

View File

@ -1257,6 +1257,7 @@ sub validate_tc_class( ) {
fatal_error "The $1 option requires a value" unless $opttype == RED_NONE || $2; fatal_error "The $1 option requires a value" unless $opttype == RED_NONE || $2;
fatal_error "The $1 option requires a value 0 < value < 1" if $opttype == RED_FLOAT && ! $3; fatal_error "The $1 option requires a value 0 < value < 1" if $opttype == RED_FLOAT && ! $3;
fatal_error "The $1 option requires an integer value" if $opttype == RED_INTEGER && $3; fatal_error "The $1 option requires an integer value" if $opttype == RED_INTEGER && $3;
fatal_error "The $1 option does not take a value" if $opttype == RED_NONE && $2;
$redopts{$1} = $2; $redopts{$1} = $2;
} else { } else {
fatal_error "Invalid 'red' option specification ($redopt)"; fatal_error "Invalid 'red' option specification ($redopt)";