summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2021-02-03 17:57:06 +0100
committerFlorian Westphal <fw@strlen.de>2021-02-16 15:11:21 +0100
commit84b1d078e86dea25c93e15c3e5a3160bbf77e4e7 (patch)
tree1e05aa3b4401c394d20005a506647f85e30ef371
parenta9350dc93850b1e616d65acf30651377dcd1d87d (diff)
evaluate: pick data element byte order, not dtype one
Some expressions have integer base type, not a specific one, e.g. 'ct zone'. In that case nft used the wrong byte order. Without this, nft adds elements = { "eth0" : 256, "eth1" : 512, "veth4" : 256 } instead of 1, 2, 3. This is not a 'display bug', the added elements have wrong byte order. Signed-off-by: Florian Westphal <fw@strlen.de>
-rw-r--r--src/evaluate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/evaluate.c b/src/evaluate.c
index 782a5bca..0ab94ab8 100644
--- a/src/evaluate.c
+++ b/src/evaluate.c
@@ -1598,7 +1598,7 @@ static int expr_evaluate_mapping(struct eval_ctx *ctx, struct expr **expr)
else
datalen = set->data->len;
- expr_set_context(&ctx->ectx, set->data->dtype, datalen);
+ __expr_set_context(&ctx->ectx, set->data->dtype, set->data->byteorder, datalen, 0);
} else {
assert((set->flags & NFT_SET_MAP) == 0);
}