From: Pablo Neira Ayuso Date: Tue, 24 Feb 2009 13:48:01 +0000 (+0100) Subject: netfilter: nf_conntrack: account packets drop by tcp_packet() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7d1e04598e5e92527840b6889fb75b4b30fdd33b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git netfilter: nf_conntrack: account packets drop by tcp_packet() Since tcp_packet() may return -NF_DROP in two situations, the packet-drop stats must be increased. Signed-off-by: Pablo Neira Ayuso Signed-off-by: Patrick McHardy --- diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 2235432c59d1..ebc275600125 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c @@ -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; }