net: Create and use new helper xfrm_dst_child().
[linux-2.6-block.git] / net / ipv6 / xfrm6_mode_tunnel.c
index 02556e356f87e94830e76bb6f4f519e4cf1eb4d7..e66b94f465320e6abf49b91f41a6687f1f015e3d 100644 (file)
@@ -59,7 +59,7 @@ static int xfrm6_mode_tunnel_output(struct xfrm_state *x, struct sk_buff *skb)
        if (x->props.flags & XFRM_STATE_NOECN)
                dsfield &= ~INET_ECN_MASK;
        ipv6_change_dsfield(top_iph, 0, dsfield);
-       top_iph->hop_limit = ip6_dst_hoplimit(dst->child);
+       top_iph->hop_limit = ip6_dst_hoplimit(xfrm_dst_child(dst));
        top_iph->saddr = *(struct in6_addr *)&x->props.saddr;
        top_iph->daddr = *(struct in6_addr *)&x->id.daddr;
        return 0;