diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-02-27 23:42:03 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-02-28 00:55:29 +0100 |
commit | e6ca6739cc136d05ec3d13dbf82cdee247bee1d9 (patch) | |
tree | 4bd5dffe68b5386569999a9297b63e8f8fbf5c4d /src/evaluate.c | |
parent | fb2d2de9fecf169ce23add590eb9a64b80a889a9 (diff) |
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 <pablo@netfilter.org>
Diffstat (limited to 'src/evaluate.c')
-rw-r--r-- | src/evaluate.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; |