This provides a generic way to transfer shifts from the left hand side to the right hand range side of a relational expression when performing transformations from the evaluation step. Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> --- src/evaluate.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/evaluate.c b/src/evaluate.c index f862cd0..60bbce1 100644 --- a/src/evaluate.c +++ b/src/evaluate.c @@ -1146,6 +1146,18 @@ static int binop_transfer(struct eval_ctx *ctx, struct expr **expr) if (binop_transfer_one(ctx, left, &(*expr)->right) < 0) return -1; break; + case EXPR_RANGE: + err = binop_can_transfer(ctx, left, (*expr)->right->left); + if (err <= 0) + return err; + err = binop_can_transfer(ctx, left, (*expr)->right->right); + if (err <= 0) + return err; + if (binop_transfer_one(ctx, left, &(*expr)->right->left) < 0) + return -1; + if (binop_transfer_one(ctx, left, &(*expr)->right->right) < 0) + return -1; + break; case EXPR_SET: list_for_each_entry(i, &(*expr)->right->expressions, list) { err = binop_can_transfer(ctx, left, i); -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html