diff options
Diffstat (limited to 'net/sctp/transport.c')
-rw-r--r-- | net/sctp/transport.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/sctp/transport.c b/net/sctp/transport.c index e1448addcd93..74faa1b6dbfe 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c | |||
@@ -256,11 +256,13 @@ void sctp_transport_route(struct sctp_transport *transport, | |||
256 | 256 | ||
257 | dst = af->get_dst(asoc, daddr, saddr); | 257 | dst = af->get_dst(asoc, daddr, saddr); |
258 | 258 | ||
259 | if (saddr) | 259 | if (saddr) { |
260 | memcpy(&transport->saddr_h, saddr, sizeof(union sctp_addr)); | 260 | memcpy(&transport->saddr_h, saddr, sizeof(union sctp_addr)); |
261 | else | 261 | flip_to_n(&transport->saddr, &transport->saddr_h); |
262 | af->get_saddr(asoc, dst, daddr, &transport->saddr_h); | 262 | } else { |
263 | flip_to_n(&transport->saddr, &transport->saddr_h); | 263 | af->get_saddr(asoc, dst, &transport->ipaddr, &transport->saddr); |
264 | flip_to_h(&transport->saddr_h, &transport->saddr); | ||
265 | } | ||
264 | 266 | ||
265 | transport->dst = dst; | 267 | transport->dst = dst; |
266 | if ((transport->param_flags & SPP_PMTUD_DISABLE) && transport->pathmtu) { | 268 | if ((transport->param_flags & SPP_PMTUD_DISABLE) && transport->pathmtu) { |