Commit cb866e32 authored by Steffen Klassert's avatar Steffen Klassert
Browse files

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: default avatarSteffen Klassert <steffen.klassert@secunet.com>
parent ea673a4d
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -330,9 +330,11 @@ resume:


		if (x->sel.family == AF_UNSPEC) {
		if (x->sel.family == AF_UNSPEC) {
			inner_mode = xfrm_ip2inner_mode(x, XFRM_MODE_SKB_CB(skb)->protocol);
			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;
				goto drop;
			}
			}
		}


		if (inner_mode->input(x, skb)) {
		if (inner_mode->input(x, skb)) {
			XFRM_INC_STATS(net, LINUX_MIB_XFRMINSTATEMODEERROR);
			XFRM_INC_STATS(net, LINUX_MIB_XFRMINSTATEMODEERROR);