diff options
author | Florian Westphal <fw@strlen.de> | 2022-12-12 11:04:35 +0100 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2022-12-12 17:36:10 +0100 |
commit | 284c038ef4c69d042ef91272d90c143019ecea1f (patch) | |
tree | b48fb0ef1e502660beb1d845011fdb091c6fa748 /src/evaluate.c | |
parent | db59a5c1204c9246a82a115a8761f15809578479 (diff) |
netlink_linearize: fix timeout with map updates
Map updates can use timeouts, just like with sets, but the
linearization step did not pass this info to the kernel.
meta l4proto tcp update @pinned { ip saddr . ct original proto-src timeout 90s : ip daddr . tcp dport
Listing this won't show the "timeout 90s" because kernel never saw it to
begin with.
Also update evaluation step to reject a timeout that was set on
the data part: Timeouts are only allowed for the key-value pair
as a whole.
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src/evaluate.c')
-rw-r--r-- | src/evaluate.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/evaluate.c b/src/evaluate.c index d0279e33..c04cb91d 100644 --- a/src/evaluate.c +++ b/src/evaluate.c @@ -3898,6 +3898,9 @@ static int stmt_evaluate_map(struct eval_ctx *ctx, struct stmt *stmt) if (stmt->map.data->comment != NULL) return expr_error(ctx->msgs, stmt->map.data, "Data expression comments are not supported"); + if (stmt->map.data->timeout > 0) + return expr_error(ctx->msgs, stmt->map.data, + "Data expression timeouts are not supported"); list_for_each_entry(this, &stmt->map.stmt_list, list) { if (stmt_evaluate(ctx, this) < 0) |