diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2008-12-21 19:39:39 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2008-12-21 19:39:39 +0100 |
commit | 7b3f57d5007dd2cf4127c2c3a9a7cd0f64d5d6e9 (patch) | |
tree | af5056d1a50fc62e640508c735114c3c4157ab0e /src/network.c | |
parent | b666e6ebbd0c0ae7967ff8167790166858544297 (diff) | |
download | conntrack-tools-7b3f57d5007dd2cf4127c2c3a9a7cd0f64d5d6e9.tar.gz conntrack-tools-7b3f57d5007dd2cf4127c2c3a9a7cd0f64d5d6e9.zip |
src: add network statistics via `-s network'
This patch adds networks statistics that you can check via
`conntrackd -s network'. This information is useful for
trouble-shooting.
This patch replaces several log messages that can be triggered in
runtime. The idea behind this patch is to avoid log message flooding
under errors.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/network.c')
-rw-r--r-- | src/network.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/network.c b/src/network.c index 090dec8..598195f 100644 --- a/src/network.c +++ b/src/network.c @@ -147,14 +147,17 @@ int mcast_track_seq(uint32_t seq, uint32_t *exp_seq) /* out of sequence: some messages got lost */ if (after(seq, STATE_SYNC(last_seq_recv)+1)) { - STATE_SYNC(packets_lost) += seq-STATE_SYNC(last_seq_recv)+1; + STATE_SYNC(error).msg_rcv_lost += + seq - STATE_SYNC(last_seq_recv) + 1; ret = SEQ_AFTER; goto out; } /* out of sequence: replayed/delayed packet? */ - if (before(seq, STATE_SYNC(last_seq_recv)+1)) + if (before(seq, STATE_SYNC(last_seq_recv)+1)) { + STATE_SYNC(error).msg_rcv_before++; ret = SEQ_BEFORE; + } out: *exp_seq = STATE_SYNC(last_seq_recv)+1; |