In 2.6.38 dst metrics became shared and use copy-on-write instead
of using private versions. This means that it is no longer permissible
to directly access the metric and we need to use the helper function
instead.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
iph->saddr = rt->rt_src;
iph->ttl = mutable->ttl;
if (!iph->ttl)
- iph->ttl = dst_metric(&rt_dst(rt), RTAX_HOPLIMIT);
+ iph->ttl = ip4_dst_hoplimit(&rt_dst(rt));
tnl_vport->tnl_ops->build_header(vport, mutable, iph + 1);
}
/* TTL */
ttl = mutable->ttl;
if (!ttl)
- ttl = dst_metric(&rt_dst(rt), RTAX_HOPLIMIT);
+ ttl = ip4_dst_hoplimit(&rt_dst(rt));
if (mutable->flags & TNL_F_TTL_INHERIT) {
if (skb->protocol == htons(ETH_P_IP))