ipv4: Make output route lookup return rtable directly.

Instead of on the stack.

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller
2011-03-02 14:31:35 -08:00
parent 452edd598f
commit b23dd4fe42
36 changed files with 267 additions and 224 deletions

View File

@@ -564,10 +564,12 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
}
security_sk_classify_flow(sk, &fl);
err = ip_route_output_flow(sock_net(sk), &rt, &fl, sk);
rt = ip_route_output_flow(sock_net(sk), &fl, sk);
if (IS_ERR(rt)) {
err = PTR_ERR(rt);
goto done;
}
}
if (err)
goto done;
err = -EACCES;
if (rt->rt_flags & RTCF_BROADCAST && !sock_flag(sk, SOCK_BROADCAST))