skb_reset_network_header(nskb);
        ip6h = ipv6_hdr(nskb);
        ip6h->version = 6;
-       ip6h->hop_limit = dst_metric(dst, RTAX_HOPLIMIT);
+       ip6h->hop_limit = ip6_dst_hoplimit(dst);
        ip6h->nexthdr = IPPROTO_TCP;
        ipv6_addr_copy(&ip6h->saddr, &oip6h->daddr);
        ipv6_addr_copy(&ip6h->daddr, &oip6h->saddr);
 
 #include <net/dsfield.h>
 #include <net/dst.h>
 #include <net/inet_ecn.h>
+#include <net/ip6_route.h>
 #include <net/ipv6.h>
 #include <net/xfrm.h>
 
        if (x->props.flags & XFRM_STATE_NOECN)
                dsfield &= ~INET_ECN_MASK;
        ipv6_change_dsfield(top_iph, 0, dsfield);
-       top_iph->hop_limit = dst_metric(dst->child, RTAX_HOPLIMIT);
+       top_iph->hop_limit = ip6_dst_hoplimit(dst->child);
        ipv6_addr_copy(&top_iph->saddr, (struct in6_addr *)&x->props.saddr);
        ipv6_addr_copy(&top_iph->daddr, (struct in6_addr *)&x->id.daddr);
        return 0;