From: Kazunori Miyazawa <kazunori@miyazawa.org>
[linux-2.6.git] / net / ipv6 / xfrm6_policy.c
index 4429b1a1fe5fe2528318b7417e539279548d9988..cf1d91e74c82a3939ecd2f796ea385fb7eefcff1 100644 (file)
@@ -113,6 +113,8 @@ __xfrm6_bundle_create(struct xfrm_policy *policy, struct xfrm_state **xfrm, int
 
                xdst = (struct xfrm_dst *)dst1;
                xdst->route = &rt->u.dst;
+               if (rt->rt6i_node)
+                       xdst->route_cookie = rt->rt6i_node->fn_sernum;
 
                dst1->next = dst_prev;
                dst_prev = dst1;
@@ -137,6 +139,8 @@ __xfrm6_bundle_create(struct xfrm_policy *policy, struct xfrm_state **xfrm, int
 
        dst_prev->child = &rt->u.dst;
        dst->path = &rt->u.dst;
+       if (rt->rt6i_node)
+               ((struct xfrm_dst *)dst)->path_cookie = rt->rt6i_node->fn_sernum;
 
        *dst_p = dst;
        dst = dst_prev;