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.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index 74faa1b6dbfe..33e7d85f1119 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -234,7 +234,7 @@ void sctp_transport_pmtu(struct sctp_transport *transport)
234{ 234{
235 struct dst_entry *dst; 235 struct dst_entry *dst;
236 236
237 dst = transport->af_specific->get_dst(NULL, &transport->ipaddr_h, NULL); 237 dst = transport->af_specific->get_dst(NULL, &transport->ipaddr, NULL);
238 238
239 if (dst) { 239 if (dst) {
240 transport->pathmtu = dst_mtu(dst); 240 transport->pathmtu = dst_mtu(dst);
@@ -251,16 +251,18 @@ void sctp_transport_route(struct sctp_transport *transport,
251{ 251{
252 struct sctp_association *asoc = transport->asoc; 252 struct sctp_association *asoc = transport->asoc;
253 struct sctp_af *af = transport->af_specific; 253 struct sctp_af *af = transport->af_specific;
254 union sctp_addr *daddr = &transport->ipaddr_h; 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);
256 258
257 dst = af->get_dst(asoc, daddr, saddr); 259 dst = af->get_dst(asoc, daddr, &tmp);
258 260
259 if (saddr) { 261 if (saddr) {
260 memcpy(&transport->saddr_h, saddr, sizeof(union sctp_addr)); 262 memcpy(&transport->saddr_h, saddr, sizeof(union sctp_addr));
261 flip_to_n(&transport->saddr, &transport->saddr_h); 263 flip_to_n(&transport->saddr, &transport->saddr_h);
262 } else { 264 } else {
263 af->get_saddr(asoc, dst, &transport->ipaddr, &transport->saddr); 265 af->get_saddr(asoc, dst, daddr, &transport->saddr);
264 flip_to_h(&transport->saddr_h, &transport->saddr); 266 flip_to_h(&transport->saddr_h, &transport->saddr);
265 } 267 }
266 268