summaryrefslogtreecommitdiffstats
path: root/iptables/nft.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2020-05-08 15:40:52 +0200
committerPhil Sutter <phil@nwl.cc>2020-05-18 17:40:41 +0200
commit5906bcf10d0eda9d08c98a618ea7c8ade0018e0c (patch)
treed0192984a9b06b366468869b15f3dbaec0f33322 /iptables/nft.c
parente7b6180fcf9061852a06f6d98e7618f44fd0eeec (diff)
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 <phil@nwl.cc>
Diffstat (limited to 'iptables/nft.c')
-rw-r--r--iptables/nft.c5
1 files changed, 3 insertions, 2 deletions
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) {