* [PATCH nft] netlink: delinearize: copy set keytype if needed
@ 2023-07-25 19:24 Florian Westphal
0 siblings, 0 replies; only message in thread
From: Florian Westphal @ 2023-07-25 19:24 UTC (permalink / raw)
To: netfilter-devel; +Cc: Florian Westphal
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>
---
Found with an unrelated test case, i will submit that one as well soon.
src/netlink_delinearize.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/netlink_delinearize.c b/src/netlink_delinearize.c
index 9241f46622ff..125b6c685f80 100644
--- a/src/netlink_delinearize.c
+++ b/src/netlink_delinearize.c
@@ -1734,6 +1734,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);
--
2.41.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-25 19:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-25 19:24 [PATCH nft] netlink: delinearize: copy set keytype if needed Florian Westphal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).