mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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:
parent
452edd598f
commit
b23dd4fe42
36 changed files with 267 additions and 224 deletions
|
@ -491,9 +491,9 @@ static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc,
|
|||
SCTP_DEBUG_PRINTK("%s: DST:%pI4, SRC:%pI4 - ",
|
||||
__func__, &fl.fl4_dst, &fl.fl4_src);
|
||||
|
||||
if (!ip_route_output_key(&init_net, &rt, &fl)) {
|
||||
rt = ip_route_output_key(&init_net, &fl);
|
||||
if (!IS_ERR(rt))
|
||||
dst = &rt->dst;
|
||||
}
|
||||
|
||||
/* If there is no association or if a source address is passed, no
|
||||
* more validation is required.
|
||||
|
@ -535,7 +535,8 @@ static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc,
|
|||
(AF_INET == laddr->a.sa.sa_family)) {
|
||||
fl.fl4_src = laddr->a.v4.sin_addr.s_addr;
|
||||
fl.fl_ip_sport = laddr->a.v4.sin_port;
|
||||
if (!ip_route_output_key(&init_net, &rt, &fl)) {
|
||||
rt = ip_route_output_key(&init_net, &fl);
|
||||
if (!IS_ERR(rt)) {
|
||||
dst = &rt->dst;
|
||||
goto out_unlock;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue