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/raw.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/raw.c')
-rw-r--r-- | net/ipv4/raw.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index d7a2d1eaec09..467d570d087a 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
@@ -564,10 +564,12 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
564 | } | 564 | } |
565 | 565 | ||
566 | security_sk_classify_flow(sk, &fl); | 566 | security_sk_classify_flow(sk, &fl); |
567 | err = ip_route_output_flow(sock_net(sk), &rt, &fl, sk); | 567 | rt = ip_route_output_flow(sock_net(sk), &fl, sk); |
568 | if (IS_ERR(rt)) { | ||
569 | err = PTR_ERR(rt); | ||
570 | goto done; | ||
571 | } | ||
568 | } | 572 | } |
569 | if (err) | ||
570 | goto done; | ||
571 | 573 | ||
572 | err = -EACCES; | 574 | err = -EACCES; |
573 | if (rt->rt_flags & RTCF_BROADCAST && !sock_flag(sk, SOCK_BROADCAST)) | 575 | if (rt->rt_flags & RTCF_BROADCAST && !sock_flag(sk, SOCK_BROADCAST)) |