diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/xfrm/xfrm_input.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c index 85d1d4764612..526c4feb3b50 100644 --- a/net/xfrm/xfrm_input.c +++ b/net/xfrm/xfrm_input.c | |||
@@ -238,11 +238,6 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type) | |||
238 | 238 | ||
239 | skb->sp->xvec[skb->sp->len++] = x; | 239 | skb->sp->xvec[skb->sp->len++] = x; |
240 | 240 | ||
241 | if (xfrm_tunnel_check(skb, x, family)) { | ||
242 | XFRM_INC_STATS(net, LINUX_MIB_XFRMINSTATEMODEERROR); | ||
243 | goto drop; | ||
244 | } | ||
245 | |||
246 | spin_lock(&x->lock); | 241 | spin_lock(&x->lock); |
247 | if (unlikely(x->km.state == XFRM_STATE_ACQ)) { | 242 | if (unlikely(x->km.state == XFRM_STATE_ACQ)) { |
248 | XFRM_INC_STATS(net, LINUX_MIB_XFRMACQUIREERROR); | 243 | XFRM_INC_STATS(net, LINUX_MIB_XFRMACQUIREERROR); |
@@ -271,6 +266,11 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type) | |||
271 | 266 | ||
272 | spin_unlock(&x->lock); | 267 | spin_unlock(&x->lock); |
273 | 268 | ||
269 | if (xfrm_tunnel_check(skb, x, family)) { | ||
270 | XFRM_INC_STATS(net, LINUX_MIB_XFRMINSTATEMODEERROR); | ||
271 | goto drop; | ||
272 | } | ||
273 | |||
274 | seq_hi = htonl(xfrm_replay_seqhi(x, seq)); | 274 | seq_hi = htonl(xfrm_replay_seqhi(x, seq)); |
275 | 275 | ||
276 | XFRM_SKB_CB(skb)->seq.input.low = seq; | 276 | XFRM_SKB_CB(skb)->seq.input.low = seq; |