diff options
author | Phil Sutter <phil@nwl.cc> | 2020-05-08 15:40:52 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2020-05-18 17:40:41 +0200 |
commit | 5906bcf10d0eda9d08c98a618ea7c8ade0018e0c (patch) | |
tree | d0192984a9b06b366468869b15f3dbaec0f33322 /iptables/nft.c | |
parent | e7b6180fcf9061852a06f6d98e7618f44fd0eeec (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.c | 5 |
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) { |