diff options
-rw-r--r-- | include/net/xfrm.h | 5 | ||||
-rw-r--r-- | net/xfrm/xfrm_input.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 503d0d294a4c..fe881b6e2bd0 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -1317,4 +1317,9 @@ static inline void xfrm_states_delete(struct xfrm_state **states, int n) | |||
1317 | } | 1317 | } |
1318 | #endif | 1318 | #endif |
1319 | 1319 | ||
1320 | static inline struct xfrm_state *xfrm_input_state(struct sk_buff *skb) | ||
1321 | { | ||
1322 | return skb->sp->xvec[skb->sp->len - 1]; | ||
1323 | } | ||
1324 | |||
1320 | #endif /* _NET_XFRM_H */ | 1325 | #endif /* _NET_XFRM_H */ |
diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c index 8b2b1b59133e..8624cbdb2a1e 100644 --- a/net/xfrm/xfrm_input.c +++ b/net/xfrm/xfrm_input.c | |||
@@ -109,7 +109,7 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type) | |||
109 | /* A negative encap_type indicates async resumption. */ | 109 | /* A negative encap_type indicates async resumption. */ |
110 | if (encap_type < 0) { | 110 | if (encap_type < 0) { |
111 | async = 1; | 111 | async = 1; |
112 | x = skb->sp->xvec[skb->sp->len - 1]; | 112 | x = xfrm_input_state(skb); |
113 | seq = XFRM_SKB_CB(skb)->seq; | 113 | seq = XFRM_SKB_CB(skb)->seq; |
114 | goto resume; | 114 | goto resume; |
115 | } | 115 | } |