diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-12-11 01:53:43 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 14:57:05 -0800 |
commit | 005011211f559113686938c2c252b8ee1ab855b5 (patch) | |
tree | a126bc8cbbfa9a263e06cc517fe3c1ae6f31af59 /include/net | |
parent | 385ac2e3f226c09cb71733df1899658e33a7850f (diff) |
[IPSEC]: Add xfrm_input_state helper
This patch adds the xfrm_input_state helper function which returns the
current xfrm state being processed on the input path given an sk_buff.
This is currently only used by xfrm_input but will be used by ESP upon
asynchronous resumption.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/xfrm.h | 5 |
1 files changed, 5 insertions, 0 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) } #endif +static inline struct xfrm_state *xfrm_input_state(struct sk_buff *skb) +{ + return skb->sp->xvec[skb->sp->len - 1]; +} + #endif /* _NET_XFRM_H */ |