From: Steffen Klassert Date: Fri, 23 Oct 2015 05:52:58 +0000 (+0200) Subject: xfrm: Increment statistic counter on inner mode error X-Git-Tag: Ubuntu-5.10.0-12.13~13833^2~38^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=cb866e3298cd7412503fc7e2c265753c853fab9d;p=mirror_ubuntu-hirsute-kernel.git xfrm: Increment statistic counter on inner mode error Increment the LINUX_MIB_XFRMINSTATEMODEERROR statistic counter to notify about dropped packets if we fail to fetch a inner mode. Signed-off-by: Steffen Klassert --- diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c index 60ce7014e1b0..ad7f5b3f9b61 100644 --- a/net/xfrm/xfrm_input.c +++ b/net/xfrm/xfrm_input.c @@ -330,8 +330,10 @@ resume: if (x->sel.family == AF_UNSPEC) { inner_mode = xfrm_ip2inner_mode(x, XFRM_MODE_SKB_CB(skb)->protocol); - if (inner_mode == NULL) + if (inner_mode == NULL) { + XFRM_INC_STATS(net, LINUX_MIB_XFRMINSTATEMODEERROR); goto drop; + } } if (inner_mode->input(x, skb)) {