diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-02 17:31:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-02 17:31:35 -0500 |
commit | b23dd4fe42b455af5c6e20966b7d6959fa8352ea (patch) | |
tree | bf97323eae9a8d084170e573ff2c0c40bc72c3cd /net/ipv4/udp.c | |
parent | 452edd598f60522c11f7f88fdbab27eb36509d1a (diff) |
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 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index ed9a5b7bee53..95e0c2c194a1 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -922,8 +922,9 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
922 | struct net *net = sock_net(sk); | 922 | struct net *net = sock_net(sk); |
923 | 923 | ||
924 | security_sk_classify_flow(sk, &fl); | 924 | security_sk_classify_flow(sk, &fl); |
925 | err = ip_route_output_flow(net, &rt, &fl, sk); | 925 | rt = ip_route_output_flow(net, &fl, sk); |
926 | if (err) { | 926 | if (IS_ERR(rt)) { |
927 | err = PTR_ERR(rt); | ||
927 | if (err == -ENETUNREACH) | 928 | if (err == -ENETUNREACH) |
928 | IP_INC_STATS_BH(net, IPSTATS_MIB_OUTNOROUTES); | 929 | IP_INC_STATS_BH(net, IPSTATS_MIB_OUTNOROUTES); |
929 | goto out; | 930 | goto out; |