diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-02 14:31:35 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-02 14:31:35 -0800 |
commit | b23dd4fe42b455af5c6e20966b7d6959fa8352ea (patch) | |
tree | bf97323eae9a8d084170e573ff2c0c40bc72c3cd /drivers/net/cnic.c | |
parent | 452edd598f60522c11f7f88fdbab27eb36509d1a (diff) | |
download | blackbird-op-linux-b23dd4fe42b455af5c6e20966b7d6959fa8352ea.tar.gz blackbird-op-linux-b23dd4fe42b455af5c6e20966b7d6959fa8352ea.zip |
ipv4: Make output route lookup return rtable directly.
Instead of on the stack.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cnic.c')
-rw-r--r-- | drivers/net/cnic.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c index 5274de3e1bb9..25f08880ae0f 100644 --- a/drivers/net/cnic.c +++ b/drivers/net/cnic.c @@ -3397,9 +3397,12 @@ static int cnic_get_v4_route(struct sockaddr_in *dst_addr, memset(&fl, 0, sizeof(fl)); fl.nl_u.ip4_u.daddr = dst_addr->sin_addr.s_addr; - err = ip_route_output_key(&init_net, &rt, &fl); - if (!err) + rt = ip_route_output_key(&init_net, &fl); + err = 0; + if (!IS_ERR(rt)) *dst = &rt->dst; + else + err = PTR_ERR(rt); return err; #else return -ENETUNREACH; |