sctp: get sock from transport in sctp_transport_update_pmtu
This patch is almost to revert commit 02f3d4ce9e
("sctp: Adjust PMTU
updates to accomodate route invalidation."). As t->asoc can't be NULL
in sctp_transport_update_pmtu, it could get sk from asoc, and no need
to pass sk into that function.
It is also to remove some duplicated codes from that function.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
e90be21b1c
commit
3ebfdf0821
@@ -1907,7 +1907,7 @@ static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len)
|
||||
}
|
||||
|
||||
if (asoc->pmtu_pending)
|
||||
sctp_assoc_pending_pmtu(sk, asoc);
|
||||
sctp_assoc_pending_pmtu(asoc);
|
||||
|
||||
/* If fragmentation is disabled and the message length exceeds the
|
||||
* association fragmentation point, return EMSGSIZE. The I-D
|
||||
@@ -2435,7 +2435,7 @@ static int sctp_apply_peer_addr_params(struct sctp_paddrparams *params,
|
||||
if ((params->spp_flags & SPP_PMTUD_DISABLE) && params->spp_pathmtu) {
|
||||
if (trans) {
|
||||
trans->pathmtu = params->spp_pathmtu;
|
||||
sctp_assoc_sync_pmtu(sctp_opt2sk(sp), asoc);
|
||||
sctp_assoc_sync_pmtu(asoc);
|
||||
} else if (asoc) {
|
||||
asoc->pathmtu = params->spp_pathmtu;
|
||||
} else {
|
||||
@@ -2451,7 +2451,7 @@ static int sctp_apply_peer_addr_params(struct sctp_paddrparams *params,
|
||||
(trans->param_flags & ~SPP_PMTUD) | pmtud_change;
|
||||
if (update) {
|
||||
sctp_transport_pmtu(trans, sctp_opt2sk(sp));
|
||||
sctp_assoc_sync_pmtu(sctp_opt2sk(sp), asoc);
|
||||
sctp_assoc_sync_pmtu(asoc);
|
||||
}
|
||||
} else if (asoc) {
|
||||
asoc->param_flags =
|
||||
|
Reference in New Issue
Block a user