aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/protocol.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-02 17:31:35 -0500
committerDavid S. Miller <davem@davemloft.net>2011-03-02 17:31:35 -0500
commitb23dd4fe42b455af5c6e20966b7d6959fa8352ea (patch)
treebf97323eae9a8d084170e573ff2c0c40bc72c3cd /net/sctp/protocol.c
parent452edd598f60522c11f7f88fdbab27eb36509d1a (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/sctp/protocol.c')
-rw-r--r--net/sctp/protocol.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index e58f9476f29c..4e55e6c49ec9 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -491,9 +491,9 @@ static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc,
491 SCTP_DEBUG_PRINTK("%s: DST:%pI4, SRC:%pI4 - ", 491 SCTP_DEBUG_PRINTK("%s: DST:%pI4, SRC:%pI4 - ",
492 __func__, &fl.fl4_dst, &fl.fl4_src); 492 __func__, &fl.fl4_dst, &fl.fl4_src);
493 493
494 if (!ip_route_output_key(&init_net, &rt, &fl)) { 494 rt = ip_route_output_key(&init_net, &fl);
495 if (!IS_ERR(rt))
495 dst = &rt->dst; 496 dst = &rt->dst;
496 }
497 497
498 /* If there is no association or if a source address is passed, no 498 /* If there is no association or if a source address is passed, no
499 * more validation is required. 499 * more validation is required.
@@ -535,7 +535,8 @@ static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc,
535 (AF_INET == laddr->a.sa.sa_family)) { 535 (AF_INET == laddr->a.sa.sa_family)) {
536 fl.fl4_src = laddr->a.v4.sin_addr.s_addr; 536 fl.fl4_src = laddr->a.v4.sin_addr.s_addr;
537 fl.fl_ip_sport = laddr->a.v4.sin_port; 537 fl.fl_ip_sport = laddr->a.v4.sin_port;
538 if (!ip_route_output_key(&init_net, &rt, &fl)) { 538 rt = ip_route_output_key(&init_net, &fl);
539 if (!IS_ERR(rt)) {
539 dst = &rt->dst; 540 dst = &rt->dst;
540 goto out_unlock; 541 goto out_unlock;
541 } 542 }