From de782e891c0988cd38c78df32574d617ed65321f Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 19 Jul 2018 18:32:01 +0200 Subject: xtables: merge nft_ipv{4,6}_parse_target() Both functions are identical, replace them by a common one in nft-shared.c. Signed-off-by: Phil Sutter Signed-off-by: Florian Westphal --- iptables/nft-ipv6.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'iptables/nft-ipv6.c') diff --git a/iptables/nft-ipv6.c b/iptables/nft-ipv6.c index 018f1d3f..ddaeb2b4 100644 --- a/iptables/nft-ipv6.c +++ b/iptables/nft-ipv6.c @@ -367,13 +367,6 @@ static void nft_ipv6_post_parse(int command, struct iptables_command_state *cs, " source or destination IP addresses"); } -static void nft_ipv6_parse_target(struct xtables_target *t, void *data) -{ - struct iptables_command_state *cs = data; - - cs->target = t; -} - static bool nft_ipv6_rule_find(struct nft_family_ops *ops, struct nftnl_rule *r, void *data) { @@ -465,7 +458,7 @@ struct nft_family_ops nft_family_ops_ipv6 = { .save_counters = nft_ipv6_save_counters, .proto_parse = nft_ipv6_proto_parse, .post_parse = nft_ipv6_post_parse, - .parse_target = nft_ipv6_parse_target, + .parse_target = nft_ipv46_parse_target, .rule_to_cs = nft_rule_to_iptables_command_state, .clear_cs = nft_clear_iptables_command_state, .rule_find = nft_ipv6_rule_find, -- cgit v1.2.3