]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/xfrm/xfrm_policy.c
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
[net-next-2.6.git] / net / xfrm / xfrm_policy.c
index d965a2bad8d3b9cf993f72eaa372fb791642f3bc..af1c173be4ad88906d55d7efa24fb47fcd0cf19d 100644 (file)
@@ -2153,6 +2153,7 @@ int __xfrm_route_forward(struct sk_buff *skb, unsigned short family)
                return 0;
        }
 
+       skb_dst_force(skb);
        dst = skb_dst(skb);
 
        res = xfrm_lookup(net, &dst, &fl, NULL, 0) == 0;
@@ -2299,7 +2300,8 @@ int xfrm_bundle_ok(struct xfrm_policy *pol, struct xfrm_dst *first,
                        return 0;
                if (xdst->xfrm_genid != dst->xfrm->genid)
                        return 0;
-               if (xdst->policy_genid != atomic_read(&xdst->pols[0]->genid))
+               if (xdst->num_pols > 0 &&
+                   xdst->policy_genid != atomic_read(&xdst->pols[0]->genid))
                        return 0;
 
                if (strict && fl &&