Merge tag 'kvm-ppc-next-5.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/paulu...
[linux-2.6-microblaze.git] / net / ipv6 / xfrm6_input.c
index 9ef490d..a52cb3f 100644 (file)
@@ -86,14 +86,16 @@ int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr,
 {
        struct net *net = dev_net(skb->dev);
        struct xfrm_state *x = NULL;
+       struct sec_path *sp;
        int i = 0;
 
-       if (secpath_set(skb)) {
+       sp = secpath_set(skb);
+       if (!sp) {
                XFRM_INC_STATS(net, LINUX_MIB_XFRMINERROR);
                goto drop;
        }
 
-       if (1 + skb->sp->len == XFRM_MAX_DEPTH) {
+       if (1 + sp->len == XFRM_MAX_DEPTH) {
                XFRM_INC_STATS(net, LINUX_MIB_XFRMINBUFFERERROR);
                goto drop;
        }
@@ -145,7 +147,7 @@ int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr,
                goto drop;
        }
 
-       skb->sp->xvec[skb->sp->len++] = x;
+       sp->xvec[sp->len++] = x;
 
        spin_lock(&x->lock);