diff options
author | David S. Miller <davem@davemloft.net> | 2011-05-09 14:52:02 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-10 13:32:48 -0700 |
commit | 5fc3590c81bd233c25fbe127cdcf7a8e26e12378 (patch) | |
tree | eb3f4485e47a9f1d0366d4fbeab34d688e17e17d /drivers/infiniband/core | |
parent | 902ebd3e0de618b6d39004edac00b2cc36362065 (diff) | |
download | blackbird-op-linux-5fc3590c81bd233c25fbe127cdcf7a8e26e12378.tar.gz blackbird-op-linux-5fc3590c81bd233c25fbe127cdcf7a8e26e12378.zip |
infiniband: Remove rt->rt_src usage in addr4_resolve()
Use an explicit flow key and fetch it from there.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r-- | drivers/infiniband/core/addr.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c index 4ffc224faa7f..8e21d457b899 100644 --- a/drivers/infiniband/core/addr.c +++ b/drivers/infiniband/core/addr.c @@ -185,15 +185,20 @@ static int addr4_resolve(struct sockaddr_in *src_in, __be32 dst_ip = dst_in->sin_addr.s_addr; struct rtable *rt; struct neighbour *neigh; + struct flowi4 fl4; int ret; - rt = ip_route_output(&init_net, dst_ip, src_ip, 0, addr->bound_dev_if); + memset(&fl4, 0, sizeof(fl4)); + fl4.daddr = dst_ip; + fl4.saddr = src_ip; + fl4.flowi4_oif = addr->bound_dev_if; + rt = ip_route_output_key(&init_net, &fl4); if (IS_ERR(rt)) { ret = PTR_ERR(rt); goto out; } src_in->sin_family = AF_INET; - src_in->sin_addr.s_addr = rt->rt_src; + src_in->sin_addr.s_addr = fl4.saddr; if (rt->dst.dev->flags & IFF_LOOPBACK) { ret = rdma_translate_ip((struct sockaddr *) dst_in, addr); |