From 5906bcf10d0eda9d08c98a618ea7c8ade0018e0c Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 8 May 2020 15:40:52 +0200 Subject: nft: Drop save_counters callback from family_ops All families use the same callback function, just fold it into the sole place it's called. Signed-off-by: Phil Sutter --- iptables/nft.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'iptables/nft.c') diff --git a/iptables/nft.c b/iptables/nft.c index e65eb91c..0c5a74fc 100644 --- a/iptables/nft.c +++ b/iptables/nft.c @@ -1453,8 +1453,9 @@ nft_rule_print_save(struct nft_handle *h, const struct nftnl_rule *r, ops->rule_to_cs(h, r, &cs); - if (!(format & (FMT_NOCOUNTS | FMT_C_COUNTS)) && ops->save_counters) - ops->save_counters(&cs); + if (!(format & (FMT_NOCOUNTS | FMT_C_COUNTS))) + printf("[%llu:%llu] ", (unsigned long long)cs.counters.pcnt, + (unsigned long long)cs.counters.bcnt); /* print chain name */ switch(type) { -- cgit v1.2.3