Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=005011211f559113686938c2c252b8ee1ab855b5
Commit:     005011211f559113686938c2c252b8ee1ab855b5
Parent:     385ac2e3f226c09cb71733df1899658e33a7850f
Author:     Herbert Xu <[EMAIL PROTECTED]>
AuthorDate: Tue Dec 11 01:53:43 2007 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 14:57:05 2008 -0800

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 include/net/xfrm.h    |    5 +++++
 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 503d0d2..fe881b6 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 */
diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c
index 8b2b1b5..8624cbd 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)
        /* A negative encap_type indicates async resumption. */
        if (encap_type < 0) {
                async = 1;
-               x = skb->sp->xvec[skb->sp->len - 1];
+               x = xfrm_input_state(skb);
                seq = XFRM_SKB_CB(skb)->seq;
                goto resume;
        }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to