patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / net / ipv6 / xfrm6_policy.c
index 740fb1a..1041ef9 100644 (file)
@@ -107,7 +107,6 @@ __xfrm6_bundle_create(struct xfrm_policy *policy, struct xfrm_state **xfrm, int
                        goto error;
                }
 
-               dst1->xfrm = xfrm[i];
                if (!dst)
                        dst = dst1;
                else {
@@ -139,9 +138,11 @@ __xfrm6_bundle_create(struct xfrm_policy *policy, struct xfrm_state **xfrm, int
                dst_hold(&rt->u.dst);
        }
        dst_prev->child = &rt->u.dst;
+       i = 0;
        for (dst_prev = dst; dst_prev != &rt->u.dst; dst_prev = dst_prev->child) {
                struct xfrm_dst *x = (struct xfrm_dst*)dst_prev;
 
+               dst_prev->xfrm = xfrm[i++];
                dst_prev->dev = rt->u.dst.dev;
                if (rt->u.dst.dev)
                        dev_hold(rt->u.dst.dev);
@@ -236,10 +237,10 @@ static void xfrm6_update_pmtu(struct dst_entry *dst, u32 mtu)
 {
        struct dst_entry *path = dst->path;
 
-       if (mtu >= 1280 && mtu < dst_pmtu(dst))
-               return;
-
-       path->ops->update_pmtu(path, mtu);
+       if (mtu >= IPV6_MIN_MTU && mtu < dst_pmtu(dst))
+               path->ops->update_pmtu(path, mtu);
+       
+       return;
 }
 
 struct dst_ops xfrm6_dst_ops = {