[PATCH nft] evaluate: display "Range negative size" error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



zero length ranges now allowed, therefore, update error message to refer
to negative ranges which are not possible.

Fixes: 7a6e16040d65 ("evaluate: allow for zero length ranges")
Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
---
 src/evaluate.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/evaluate.c b/src/evaluate.c
index e3ead3329636..1682ba58989e 100644
--- a/src/evaluate.c
+++ b/src/evaluate.c
@@ -1275,8 +1275,8 @@ static int expr_evaluate_range(struct eval_ctx *ctx, struct expr **expr)
 	right = range->right;
 
 	if (mpz_cmp(left->value, right->value) > 0)
-		return expr_error(ctx->msgs, range,
-				  "Range has zero or negative size");
+		return expr_error(ctx->msgs, range, "Range negative size");
+
 	datatype_set(range, left->dtype);
 	range->flags |= EXPR_F_CONSTANT;
 	return 0;
-- 
2.30.2





[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux