Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netfilter: increase IPSTATS_MIB_CSUMERRORS stat

In the ip_rcv, IPSTATS_MIB_CSUMERRORS is increased when
checksum error is occurred.
bridge netfilter routine should increase IPSTATS_MIB_CSUMERRORS.

Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

authored by

Taehee Yoo and committed by
Pablo Neira Ayuso
2412d897 f4b7ac5e

+3 -1
+3 -1
net/bridge/br_netfilter_hooks.c
··· 214 214 215 215 iph = ip_hdr(skb); 216 216 if (unlikely(ip_fast_csum((u8 *)iph, iph->ihl))) 217 - goto inhdr_error; 217 + goto csum_error; 218 218 219 219 len = ntohs(iph->tot_len); 220 220 if (skb->len < len) { ··· 236 236 */ 237 237 return 0; 238 238 239 + csum_error: 240 + __IP_INC_STATS(net, IPSTATS_MIB_CSUMERRORS); 239 241 inhdr_error: 240 242 __IP_INC_STATS(net, IPSTATS_MIB_INHDRERRORS); 241 243 drop: