aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRami Rosen <ramirose@gmail.com>2008-08-06 05:33:49 -0400
committerDavid S. Miller <davem@davemloft.net>2008-08-06 05:33:49 -0400
commit6d273f8d011c351c9603c1dbfeae2c7458edd30d (patch)
tree1f57a87061f07f69a5c580540133e601ced33f96
parent0967d61ea0d8e8a7826bd8949cd93dd1e829ac55 (diff)
ipv4: replace dst_metric() with dst_mtu() in net/ipv4/route.c.
This patch replaces dst_metric() with dst_mtu() in net/ipv4/route.c. Signed-off-by: Rami Rosen <ramirose@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv4/route.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 1bfa078ddbd0..eccb61889dfe 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1509,14 +1509,14 @@ unsigned short ip_rt_frag_needed(struct net *net, struct iphdr *iph,
1509 1509
1510 /* BSD 4.2 compatibility hack :-( */ 1510 /* BSD 4.2 compatibility hack :-( */
1511 if (mtu == 0 && 1511 if (mtu == 0 &&
1512 old_mtu >= dst_metric(&rth->u.dst, RTAX_MTU) && 1512 old_mtu >= dst_mtu(&rth->u.dst) &&
1513 old_mtu >= 68 + (iph->ihl << 2)) 1513 old_mtu >= 68 + (iph->ihl << 2))
1514 old_mtu -= iph->ihl << 2; 1514 old_mtu -= iph->ihl << 2;
1515 1515
1516 mtu = guess_mtu(old_mtu); 1516 mtu = guess_mtu(old_mtu);
1517 } 1517 }
1518 if (mtu <= dst_metric(&rth->u.dst, RTAX_MTU)) { 1518 if (mtu <= dst_mtu(&rth->u.dst)) {
1519 if (mtu < dst_metric(&rth->u.dst, RTAX_MTU)) { 1519 if (mtu < dst_mtu(&rth->u.dst)) {
1520 dst_confirm(&rth->u.dst); 1520 dst_confirm(&rth->u.dst);
1521 if (mtu < ip_rt_min_pmtu) { 1521 if (mtu < ip_rt_min_pmtu) {
1522 mtu = ip_rt_min_pmtu; 1522 mtu = ip_rt_min_pmtu;
@@ -1538,7 +1538,7 @@ unsigned short ip_rt_frag_needed(struct net *net, struct iphdr *iph,
1538 1538
1539static void ip_rt_update_pmtu(struct dst_entry *dst, u32 mtu) 1539static void ip_rt_update_pmtu(struct dst_entry *dst, u32 mtu)
1540{ 1540{
1541 if (dst_metric(dst, RTAX_MTU) > mtu && mtu >= 68 && 1541 if (dst_mtu(dst) > mtu && mtu >= 68 &&
1542 !(dst_metric_locked(dst, RTAX_MTU))) { 1542 !(dst_metric_locked(dst, RTAX_MTU))) {
1543 if (mtu < ip_rt_min_pmtu) { 1543 if (mtu < ip_rt_min_pmtu) {
1544 mtu = ip_rt_min_pmtu; 1544 mtu = ip_rt_min_pmtu;
@@ -1667,7 +1667,7 @@ static void rt_set_nexthop(struct rtable *rt, struct fib_result *res, u32 itag)
1667 1667
1668 if (dst_metric(&rt->u.dst, RTAX_HOPLIMIT) == 0) 1668 if (dst_metric(&rt->u.dst, RTAX_HOPLIMIT) == 0)
1669 rt->u.dst.metrics[RTAX_HOPLIMIT-1] = sysctl_ip_default_ttl; 1669 rt->u.dst.metrics[RTAX_HOPLIMIT-1] = sysctl_ip_default_ttl;
1670 if (dst_metric(&rt->u.dst, RTAX_MTU) > IP_MAX_MTU) 1670 if (dst_mtu(&rt->u.dst) > IP_MAX_MTU)
1671 rt->u.dst.metrics[RTAX_MTU-1] = IP_MAX_MTU; 1671 rt->u.dst.metrics[RTAX_MTU-1] = IP_MAX_MTU;
1672 if (dst_metric(&rt->u.dst, RTAX_ADVMSS) == 0) 1672 if (dst_metric(&rt->u.dst, RTAX_ADVMSS) == 0)
1673 rt->u.dst.metrics[RTAX_ADVMSS-1] = max_t(unsigned int, rt->u.dst.dev->mtu - 40, 1673 rt->u.dst.metrics[RTAX_ADVMSS-1] = max_t(unsigned int, rt->u.dst.dev->mtu - 40,