diff options
author | Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> | 2018-04-26 22:58:51 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-04-27 21:35:22 +0300 |
commit | 800e00c12733fe2ed565206dcdb515fa2f705b9f (patch) | |
tree | 073b2244e2fc44c74187656c97b40ee68486a591 /net/sctp/associola.c | |
parent | c45698f89626177f8c51409142cbe9c5bbed4af7 (diff) | |
download | linux-800e00c12733fe2ed565206dcdb515fa2f705b9f.tar.xz |
sctp: move transport pathmtu calc away of sctp_assoc_add_peer
There was only one case that sctp_assoc_add_peer couldn't handle, which
is when SPP_PMTUD_DISABLE is set and pathmtu not initialized.
So add this situation to sctp_transport_route and reuse what was
already in there.
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/associola.c')
-rw-r--r-- | net/sctp/associola.c | 9 |
1 files changed, 1 insertions, 8 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. |