From 2a6eee89083c837ac429b0e5aba33bdcaeb51a57 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 31 Jan 2023 19:55:57 +0100 Subject: nft-ruleparse: Introduce nft_create_target() Like nft_create_match(), this is a small wrapper around the typical target extension lookup and (standard) init code. To use it from nft_parse_target() and nft_parse_log(), introduce an inner variant which accepts the target payload size as parameter. The call to rule_parse_ops::target callback was problematic with standard target, because the callbacks initialized iptables_command_state::jumpto with the target name, "standard" in that case. Perform its tasks in nft_create_target(), keep it only for bridge family's special handling of watcher "targets". Signed-off-by: Phil Sutter --- iptables/nft-ruleparse-ipv4.c | 1 - 1 file changed, 1 deletion(-) (limited to 'iptables/nft-ruleparse-ipv4.c') diff --git a/iptables/nft-ruleparse-ipv4.c b/iptables/nft-ruleparse-ipv4.c index c87e159c..491cbf42 100644 --- a/iptables/nft-ruleparse-ipv4.c +++ b/iptables/nft-ruleparse-ipv4.c @@ -131,5 +131,4 @@ static void nft_ipv4_parse_payload(struct nft_xt_ctx *ctx, struct nft_ruleparse_ops nft_ruleparse_ops_ipv4 = { .meta = nft_ipv4_parse_meta, .payload = nft_ipv4_parse_payload, - .target = nft_ipv46_parse_target, }; -- cgit v1.2.3