sctp: move transport pathmtu calc away of sctp_assoc_add_peer
[sfrench/cifs-2.6.git] / net / sctp / associola.c
index a8f3b088fcb2ac82f58b7d6fb8894fe712e2bc0a..b3aa95222bd52113295cb246c503c903bdd5c353 100644 (file)
@@ -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.