From e6ca6739cc136d05ec3d13dbf82cdee247bee1d9 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 27 Feb 2017 23:42:03 +0100 Subject: src: store byteorder for set data Add new UDATA_SET_DATABYTEORDER attribute for NFTA_SET_UDATA to store the datatype byteorder. This is required if integer_type is used on the rhs of the mapping given that this datatype comes with no specific byteorder. Signed-off-by: Pablo Neira Ayuso --- src/evaluate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/evaluate.c') diff --git a/src/evaluate.c b/src/evaluate.c index 07a61180..54985166 100644 --- a/src/evaluate.c +++ b/src/evaluate.c @@ -1174,7 +1174,9 @@ static int expr_evaluate_map(struct eval_ctx *ctx, struct expr **expr) ctx->ectx.len, ctx->ectx.byteorder, mappings); - mappings->set->datatype = ectx.dtype; + + mappings->set->datatype = set_datatype_alloc(ectx.dtype, + ectx.byteorder); mappings->set->datalen = ectx.len; map->mappings = mappings; -- cgit v1.2.3