aboutsummaryrefslogtreecommitdiff
path: root/net/sctp/transport.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/transport.c')
-rw-r--r--net/sctp/transport.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index e1448addcd9..74faa1b6dbf 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -256,11 +256,13 @@ void sctp_transport_route(struct sctp_transport *transport,
dst = af->get_dst(asoc, daddr, saddr);
- if (saddr)
+ if (saddr) {
memcpy(&transport->saddr_h, saddr, sizeof(union sctp_addr));
- else
- af->get_saddr(asoc, dst, daddr, &transport->saddr_h);
- flip_to_n(&transport->saddr, &transport->saddr_h);
+ flip_to_n(&transport->saddr, &transport->saddr_h);
+ } else {
+ af->get_saddr(asoc, dst, &transport->ipaddr, &transport->saddr);
+ flip_to_h(&transport->saddr_h, &transport->saddr);
+ }
transport->dst = dst;
if ((transport->param_flags & SPP_PMTUD_DISABLE) && transport->pathmtu) {