net: use the macros defined for the members of flowi
[linux-3.10.git] / net / rxrpc / ar-peer.c
index ce08b78..a53fb25 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/in.h>
 #include <linux/in6.h>
 #include <linux/icmp.h>
+#include <linux/slab.h>
 #include <net/sock.h>
 #include <net/af_rxrpc.h>
 #include <net/ip.h>
@@ -46,27 +47,27 @@ static void rxrpc_assess_MTU_size(struct rxrpc_peer *peer)
        case AF_INET:
                fl.oif = 0;
                fl.proto = IPPROTO_UDP,
-               fl.nl_u.ip4_u.saddr = 0;
-               fl.nl_u.ip4_u.daddr = peer->srx.transport.sin.sin_addr.s_addr;
-               fl.nl_u.ip4_u.tos = 0;
+               fl.fl4_dst = peer->srx.transport.sin.sin_addr.s_addr;
+               fl.fl4_src = 0;
+               fl.fl4_tos = 0;
                /* assume AFS.CM talking to AFS.FS */
-               fl.uli_u.ports.sport = htons(7001);
-               fl.uli_u.ports.dport = htons(7000);
+               fl.fl_ip_sport = htons(7001);
+               fl.fl_ip_dport = htons(7000);
                break;
        default:
                BUG();
        }
 
-       ret = ip_route_output_key(&rt, &fl);
+       ret = ip_route_output_key(&init_net, &rt, &fl);
        if (ret < 0) {
-               kleave(" [route err %d]", ret);
+               _leave(" [route err %d]", ret);
                return;
        }
 
-       peer->if_mtu = dst_mtu(&rt->u.dst);
-       dst_release(&rt->u.dst);
+       peer->if_mtu = dst_mtu(&rt->dst);
+       dst_release(&rt->dst);
 
-       kleave(" [if_mtu %u]", peer->if_mtu);
+       _leave(" [if_mtu %u]", peer->if_mtu);
 }
 
 /*
@@ -123,10 +124,10 @@ struct rxrpc_peer *rxrpc_get_peer(struct sockaddr_rxrpc *srx, gfp_t gfp)
        const char *new = "old";
        int usage;
 
-       _enter("{%d,%d,%u.%u.%u.%u+%hu}",
+       _enter("{%d,%d,%pI4+%hu}",
               srx->transport_type,
               srx->transport_len,
-              NIPQUAD(srx->transport.sin.sin_addr),
+              &srx->transport.sin.sin_addr,
               ntohs(srx->transport.sin.sin_port));
 
        /* search the peer list first */
@@ -177,12 +178,12 @@ struct rxrpc_peer *rxrpc_get_peer(struct sockaddr_rxrpc *srx, gfp_t gfp)
        new = "new";
 
 success:
-       _net("PEER %s %d {%d,%u,%u.%u.%u.%u+%hu}",
+       _net("PEER %s %d {%d,%u,%pI4+%hu}",
             new,
             peer->debug_id,
             peer->srx.transport_type,
             peer->srx.transport.family,
-            NIPQUAD(peer->srx.transport.sin.sin_addr),
+            &peer->srx.transport.sin.sin_addr,
             ntohs(peer->srx.transport.sin.sin_port));
 
        _leave(" = %p {u=%d}", peer, atomic_read(&peer->usage));