diff options
author | Florian Westphal <fw@strlen.de> | 2023-07-25 18:51:34 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2023-11-02 11:56:20 +0100 |
commit | 690c6c956ab0f814c94607763f102ca4135a74f5 (patch) | |
tree | dbe74a155744aa25f6a68e4aaf7083ef937ab07c /src | |
parent | 020ba399ed88a3dc709ebe65c32905a006d31c68 (diff) |
netlink: delinearize: copy set keytype if needed
commit 52c200b490d806da47d1f30448470e202e97f635 upstream.
Output before:
add @dynmark { 0xa020304 [invalid type] timeout 1s : 0x00000002 } comment "also check timeout-gc"
after:
add @dynmark { 10.2.3.4 timeout 1s : 0x00000002 } comment "also check timeout-gc"
This is a followup to 76c358ccfea0 ("src: maps: update data expression dtype based on set"),
which did fix the map expression, but not the key.
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/netlink_delinearize.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/netlink_delinearize.c b/src/netlink_delinearize.c index e6c9fa65..efb3fe6a 100644 --- a/src/netlink_delinearize.c +++ b/src/netlink_delinearize.c @@ -1631,6 +1631,8 @@ static void netlink_parse_dynset(struct netlink_parse_ctx *ctx, expr = netlink_parse_concat_key(ctx, loc, sreg, set->key); if (expr == NULL) return; + } else if (expr->dtype == &invalid_type) { + expr_set_type(expr, datatype_get(set->key->dtype), set->key->byteorder); } expr = set_elem_expr_alloc(&expr->location, expr); |