netfilter: nf_conntrack: account packets drop by tcp_packet()
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 24 Feb 2009 13:48:01 +0000 (14:48 +0100)
committerPatrick McHardy <kaber@trash.net>
Tue, 24 Feb 2009 13:48:01 +0000 (14:48 +0100)
Since tcp_packet() may return -NF_DROP in two situations, the
packet-drop stats must be increased.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/netfilter/nf_conntrack_core.c

index 2235432c59d113802d2a4ee3585472ec74021cf2..ebc27560012591a7f4034a1443bf6e4cc97c4643 100644 (file)
@@ -734,6 +734,8 @@ nf_conntrack_in(struct net *net, u_int8_t pf, unsigned int hooknum,
                nf_conntrack_put(skb->nfct);
                skb->nfct = NULL;
                NF_CT_STAT_INC_ATOMIC(net, invalid);
+               if (ret == -NF_DROP)
+                       NF_CT_STAT_INC_ATOMIC(net, drop);
                return -ret;
        }