summaryrefslogtreecommitdiffstats
path: root/src/stats-mode.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2008-05-16 17:05:17 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2008-05-16 17:05:17 +0200
commitbe2450f37f2ce56eadc78793efc4a54ced4315c6 (patch)
tree0cca13c98a7a105246f9f0cf7b1afa5fdd8c163b /src/stats-mode.c
parentd97bb9c44030d1493cae82433825b77585768a75 (diff)
- remove (misleading) counters and use information from the statistics mode
- use generic nfct_copy() from libnetfilter_conntrack to update objects - use generic nfct_cmp() to compare objects
Diffstat (limited to 'src/stats-mode.c')
-rw-r--r--src/stats-mode.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/stats-mode.c b/src/stats-mode.c
index 5808320..1650d5d 100644
--- a/src/stats-mode.c
+++ b/src/stats-mode.c
@@ -89,7 +89,12 @@ static int local_handler_stats(int fd, int type, void *data)
static void dump_stats(struct nf_conntrack *ct)
{
+ nfct_attr_unset(ct, ATTR_ORIG_COUNTER_BYTES);
+ nfct_attr_unset(ct, ATTR_ORIG_COUNTER_PACKETS);
+ nfct_attr_unset(ct, ATTR_REPL_COUNTER_BYTES);
+ nfct_attr_unset(ct, ATTR_REPL_COUNTER_PACKETS);
nfct_attr_unset(ct, ATTR_TIMEOUT);
+ nfct_attr_unset(ct, ATTR_USE);
if (cache_update_force(STATE_STATS(cache), ct))
debug_ct(ct, "resync entry");