From 444d581bcc561a73d172522a83b91772f9130ba3 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 19 Jul 2018 18:32:03 +0200 Subject: xtables: get rid of nft_ipv{4,6}_save_counters() Just replace them by the shared save_counters() function after adjusting it's signature to meet callback requirements. 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 29b50878..9e9049f3 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_save_counters(const void *data) -{ - const struct iptables_command_state *cs = data; - - save_counters(cs->counters.pcnt, cs->counters.bcnt); -} - static void xlate_ipv6_addr(const char *selector, const struct in6_addr *addr, const struct in6_addr *mask, int invert, struct xt_xlate *xl) @@ -447,7 +440,7 @@ struct nft_family_ops nft_family_ops_ipv6 = { .print_header = print_header, .print_firewall = nft_ipv6_print_firewall, .save_firewall = nft_ipv6_save_firewall, - .save_counters = nft_ipv6_save_counters, + .save_counters = save_counters, .proto_parse = nft_ipv6_proto_parse, .post_parse = nft_ipv6_post_parse, .parse_target = nft_ipv46_parse_target, -- cgit v1.2.3