net: Abstract RTAX_HOPLIMIT metric accesses behind helper.

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller
2010-12-12 21:35:57 -08:00
parent abbf46ae0e
commit 5170ae824d
8 changed files with 22 additions and 9 deletions

View File

@@ -1821,7 +1821,7 @@ static void rt_set_nexthop(struct rtable *rt, struct fib_result *res, u32 itag)
} else
dst_metric_set(dst, RTAX_MTU, dst->dev->mtu);
if (dst_metric(dst, RTAX_HOPLIMIT) == 0)
if (dst_metric_raw(dst, RTAX_HOPLIMIT) == 0)
dst_metric_set(dst, RTAX_HOPLIMIT, sysctl_ip_default_ttl);
if (dst_mtu(dst) > IP_MAX_MTU)
dst_metric_set(dst, RTAX_MTU, IP_MAX_MTU);