summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/sctp/associola.c9
-rw-r--r--net/sctp/transport.c8
2 files changed, 7 insertions, 10 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index a8f3b088fcb2..b3aa95222bd5 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -652,15 +652,8 @@ struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc,
*/
peer->param_flags = asoc->param_flags;
- sctp_transport_route(peer, NULL, sp);
-
/* Initialize the pmtu of the transport. */
- if (peer->param_flags & SPP_PMTUD_DISABLE) {
- if (asoc->pathmtu)
- peer->pathmtu = asoc->pathmtu;
- else
- peer->pathmtu = SCTP_DEFAULT_MAXSEGMENT;
- }
+ sctp_transport_route(peer, NULL, sp);
/* If this is the first transport addr on this association,
* initialize the association PMTU to the peer's PMTU.
diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index 47f82bd794d9..c5fc3aed08a1 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -307,11 +307,15 @@ void sctp_transport_route(struct sctp_transport *transport,
* association's active path for getsockname().
*/
if (asoc && (!asoc->peer.primary_path ||
- (transport == asoc->peer.active_path)))
+ (transport == asoc->peer.active_path)))
opt->pf->to_sk_saddr(&transport->saddr,
asoc->base.sk);
- } else
+ } else if ((transport->param_flags & SPP_PMTUD_DISABLE) &&
+ asoc && asoc->pathmtu) {
+ transport->pathmtu = asoc->pathmtu;
+ } else {
transport->pathmtu = SCTP_DEFAULT_MAXSEGMENT;
+ }
}
/* Hold a reference to a transport. */