summaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_input.c
diff options
context:
space:
mode:
authorSteffen Klassert <steffen.klassert@secunet.com>2015-10-23 07:52:58 +0200
committerSteffen Klassert <steffen.klassert@secunet.com>2015-10-23 07:52:58 +0200
commitcb866e3298cd7412503fc7e2c265753c853fab9d (patch)
tree4d43e835c3844200b6d161b546c3b44689b59f76 /net/xfrm/xfrm_input.c
parentea673a4d3a337184f3c314dcc6300bf02f39e077 (diff)
downloadop-kernel-dev-cb866e3298cd7412503fc7e2c265753c853fab9d.zip
op-kernel-dev-cb866e3298cd7412503fc7e2c265753c853fab9d.tar.gz
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 <steffen.klassert@secunet.com>
Diffstat (limited to 'net/xfrm/xfrm_input.c')
-rw-r--r--net/xfrm/xfrm_input.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c
index 60ce701..ad7f5b3 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)) {
OpenPOWER on IntegriCloud