aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/addr.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-12 00:00:52 -0500
committerDavid S. Miller <davem@davemloft.net>2011-03-12 15:08:42 -0800
commit78fbfd8a653ca972afe479517a40661bfff6d8c3 (patch)
tree9dccc5c16bf269d53d8499064ec95a998e84c646 /drivers/infiniband/core/addr.c
parent1561747ddf9d28185548687b11aae7074d6129c4 (diff)
downloadkernel_samsung_smdk4412-78fbfd8a653ca972afe479517a40661bfff6d8c3.zip
kernel_samsung_smdk4412-78fbfd8a653ca972afe479517a40661bfff6d8c3.tar.gz
kernel_samsung_smdk4412-78fbfd8a653ca972afe479517a40661bfff6d8c3.tar.bz2
ipv4: Create and use route lookup helpers.
The idea here is this minimizes the number of places one has to edit in order to make changes to how flows are defined and used. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/infiniband/core/addr.c')
-rw-r--r--drivers/infiniband/core/addr.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c
index 2d74993..1742f72 100644
--- a/drivers/infiniband/core/addr.c
+++ b/drivers/infiniband/core/addr.c
@@ -183,17 +183,11 @@ static int addr4_resolve(struct sockaddr_in *src_in,
{
__be32 src_ip = src_in->sin_addr.s_addr;
__be32 dst_ip = dst_in->sin_addr.s_addr;
- struct flowi fl;
struct rtable *rt;
struct neighbour *neigh;
int ret;
- memset(&fl, 0, sizeof fl);
- fl.nl_u.ip4_u.daddr = dst_ip;
- fl.nl_u.ip4_u.saddr = src_ip;
- fl.oif = addr->bound_dev_if;
-
- rt = ip_route_output_key(&init_net, &fl);
+ rt = ip_route_output(&init_net, dst_ip, src_ip, 0, addr->bound_dev_if);
if (IS_ERR(rt)) {
ret = PTR_ERR(rt);
goto out;