]> git.ipfire.org Git - thirdparty/nftables.git/commit
evaluate: handle binop adjustment recursively
authorFlorian Westphal <fw@strlen.de>
Thu, 11 Jan 2018 15:30:22 +0000 (16:30 +0100)
committerFlorian Westphal <fw@strlen.de>
Sat, 17 Mar 2018 00:47:17 +0000 (01:47 +0100)
commitccf7c4fc9af2b982c24a7a3b40ecc5ebbe93ecef
tree08eec1d7fa7d93913d21133aed98f3fc14c8427d
parent00718d13ab3f27bac767035804feb7ad0cc15a1e
evaluate: handle binop adjustment recursively

currently this is fine, but a followup commit will add
EXPR_SET_ELEM handling.

And unlike RANGE we cannot assume the key is a value.
Therefore make binop_can_transfer and binop_transfer_one handle
right hand recursively if needed.  For RANGE, call it again with
from/to.

For future SET_ELEM, we can then just call the function recursively
again with right->key as new RHS.

Signed-off-by: Florian Westphal <fw@strlen.de>
src/evaluate.c