ipv4: replace dst_metric() with dst_mtu() in net/ipv4/route.c.
authorRami Rosen <ramirose@gmail.com>
Wed, 6 Aug 2008 09:33:49 +0000 (02:33 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Aug 2008 09:33:49 +0000 (02:33 -0700)
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>
net/ipv4/route.c

index 1bfa078ddbd0c357d97c269179b713c09b0a0ad3..eccb61889dfe90931789db6984391cc4afaf1bb6 100644 (file)
@@ -1509,14 +1509,14 @@ unsigned short ip_rt_frag_needed(struct net *net, struct iphdr *iph,
 
                                        /* BSD 4.2 compatibility hack :-( */
                                        if (mtu == 0 &&
-                                           old_mtu >= dst_metric(&rth->u.dst, RTAX_MTU) &&
+                                           old_mtu >= dst_mtu(&rth->u.dst) &&
                                            old_mtu >= 68 + (iph->ihl << 2))
                                                old_mtu -= iph->ihl << 2;
 
                                        mtu = guess_mtu(old_mtu);
                                }
-                               if (mtu <= dst_metric(&rth->u.dst, RTAX_MTU)) {
-                                       if (mtu < dst_metric(&rth->u.dst, RTAX_MTU)) {
+                               if (mtu <= dst_mtu(&rth->u.dst)) {
+                                       if (mtu < dst_mtu(&rth->u.dst)) {
                                                dst_confirm(&rth->u.dst);
                                                if (mtu < ip_rt_min_pmtu) {
                                                        mtu = ip_rt_min_pmtu;
@@ -1538,7 +1538,7 @@ unsigned short ip_rt_frag_needed(struct net *net, struct iphdr *iph,
 
 static void ip_rt_update_pmtu(struct dst_entry *dst, u32 mtu)
 {
-       if (dst_metric(dst, RTAX_MTU) > mtu && mtu >= 68 &&
+       if (dst_mtu(dst) > mtu && mtu >= 68 &&
            !(dst_metric_locked(dst, RTAX_MTU))) {
                if (mtu < ip_rt_min_pmtu) {
                        mtu = ip_rt_min_pmtu;
@@ -1667,7 +1667,7 @@ static void rt_set_nexthop(struct rtable *rt, struct fib_result *res, u32 itag)
 
        if (dst_metric(&rt->u.dst, RTAX_HOPLIMIT) == 0)
                rt->u.dst.metrics[RTAX_HOPLIMIT-1] = sysctl_ip_default_ttl;
-       if (dst_metric(&rt->u.dst, RTAX_MTU) > IP_MAX_MTU)
+       if (dst_mtu(&rt->u.dst) > IP_MAX_MTU)
                rt->u.dst.metrics[RTAX_MTU-1] = IP_MAX_MTU;
        if (dst_metric(&rt->u.dst, RTAX_ADVMSS) == 0)
                rt->u.dst.metrics[RTAX_ADVMSS-1] = max_t(unsigned int, rt->u.dst.dev->mtu - 40,