aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/transport.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/transport.c')
-rw-r--r--net/sctp/transport.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index 33e7d85f1119..d1b6834a3a47 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -253,19 +253,15 @@ void sctp_transport_route(struct sctp_transport *transport,
253 struct sctp_af *af = transport->af_specific; 253 struct sctp_af *af = transport->af_specific;
254 union sctp_addr *daddr = &transport->ipaddr; 254 union sctp_addr *daddr = &transport->ipaddr;
255 struct dst_entry *dst; 255 struct dst_entry *dst;
256 union sctp_addr tmp;
257 flip_to_n(&tmp, saddr);
258 256
259 dst = af->get_dst(asoc, daddr, &tmp); 257 dst = af->get_dst(asoc, daddr, saddr);
260 258
261 if (saddr) { 259 if (saddr)
262 memcpy(&transport->saddr_h, saddr, sizeof(union sctp_addr)); 260 memcpy(&transport->saddr, saddr, sizeof(union sctp_addr));
263 flip_to_n(&transport->saddr, &transport->saddr_h); 261 else
264 } else {
265 af->get_saddr(asoc, dst, daddr, &transport->saddr); 262 af->get_saddr(asoc, dst, daddr, &transport->saddr);
266 flip_to_h(&transport->saddr_h, &transport->saddr);
267 }
268 263
264 flip_to_h(&transport->saddr_h, &transport->saddr);
269 transport->dst = dst; 265 transport->dst = dst;
270 if ((transport->param_flags & SPP_PMTUD_DISABLE) && transport->pathmtu) { 266 if ((transport->param_flags & SPP_PMTUD_DISABLE) && transport->pathmtu) {
271 return; 267 return;