From 3039a52c3ecf96df4e3b815d242f788c189093e1 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 23 Dec 2021 18:55:53 +0100 Subject: xtables: Do not pass nft_handle to do_parse() Make it fit for sharing with legacy iptables, drop nft-specific parameter. This requires to mirror proto_parse and post_parse callbacks from family_ops somewhere reachable - use xt_cmd_parse, it holds other "parser setup data" as well. Signed-off-by: Phil Sutter --- iptables/nft-ipv6.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'iptables/nft-ipv6.c') diff --git a/iptables/nft-ipv6.c b/iptables/nft-ipv6.c index 13213088..4f80ed84 100644 --- a/iptables/nft-ipv6.c +++ b/iptables/nft-ipv6.c @@ -495,8 +495,10 @@ struct nft_family_ops nft_family_ops_ipv6 = { .print_rule = nft_ipv6_print_rule, .save_rule = nft_ipv6_save_rule, .save_chain = nft_ipv46_save_chain, - .proto_parse = nft_ipv6_proto_parse, - .post_parse = nft_ipv6_post_parse, + .cmd_parse = { + .proto_parse = nft_ipv6_proto_parse, + .post_parse = nft_ipv6_post_parse, + }, .parse_target = nft_ipv46_parse_target, .rule_to_cs = nft_rule_to_iptables_command_state, .clear_cs = nft_clear_iptables_command_state, -- cgit v1.2.3