diff options
Diffstat (limited to 'net/sctp/protocol.c')
-rw-r--r-- | net/sctp/protocol.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 68b4c4317d61..9d3f15957d12 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -463,17 +463,16 @@ static sctp_scope_t sctp_v4_scope(union sctp_addr *addr) | |||
463 | * addresses. If an association is passed, trys to get a dst entry with a | 463 | * addresses. If an association is passed, trys to get a dst entry with a |
464 | * source address that matches an address in the bind address list. | 464 | * source address that matches an address in the bind address list. |
465 | */ | 465 | */ |
466 | static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc, | 466 | static void sctp_v4_get_dst(struct sctp_transport *t, union sctp_addr *saddr, |
467 | union sctp_addr *daddr, | 467 | struct flowi *fl, struct sock *sk) |
468 | union sctp_addr *saddr, | ||
469 | struct flowi *fl, | ||
470 | struct sock *sk) | ||
471 | { | 468 | { |
469 | struct sctp_association *asoc = t->asoc; | ||
472 | struct rtable *rt; | 470 | struct rtable *rt; |
473 | struct flowi4 *fl4 = &fl->u.ip4; | 471 | struct flowi4 *fl4 = &fl->u.ip4; |
474 | struct sctp_bind_addr *bp; | 472 | struct sctp_bind_addr *bp; |
475 | struct sctp_sockaddr_entry *laddr; | 473 | struct sctp_sockaddr_entry *laddr; |
476 | struct dst_entry *dst = NULL; | 474 | struct dst_entry *dst = NULL; |
475 | union sctp_addr *daddr = &t->ipaddr; | ||
477 | union sctp_addr dst_saddr; | 476 | union sctp_addr dst_saddr; |
478 | 477 | ||
479 | memset(fl4, 0x0, sizeof(struct flowi4)); | 478 | memset(fl4, 0x0, sizeof(struct flowi4)); |
@@ -548,13 +547,12 @@ static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc, | |||
548 | out_unlock: | 547 | out_unlock: |
549 | rcu_read_unlock(); | 548 | rcu_read_unlock(); |
550 | out: | 549 | out: |
550 | t->dst = dst; | ||
551 | if (dst) | 551 | if (dst) |
552 | SCTP_DEBUG_PRINTK("rt_dst:%pI4, rt_src:%pI4\n", | 552 | SCTP_DEBUG_PRINTK("rt_dst:%pI4, rt_src:%pI4\n", |
553 | &rt->rt_dst, &rt->rt_src); | 553 | &rt->rt_dst, &rt->rt_src); |
554 | else | 554 | else |
555 | SCTP_DEBUG_PRINTK("NO ROUTE\n"); | 555 | SCTP_DEBUG_PRINTK("NO ROUTE\n"); |
556 | |||
557 | return dst; | ||
558 | } | 556 | } |
559 | 557 | ||
560 | /* For v4, the source address is cached in the route entry(dst). So no need | 558 | /* For v4, the source address is cached in the route entry(dst). So no need |