aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r--net/sctp/socket.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 95a5623d79a0..89af37a6c871 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -2243,7 +2243,7 @@ static int sctp_apply_peer_addr_params(struct sctp_paddrparams *params,
2243 sctp_assoc_sync_pmtu(asoc); 2243 sctp_assoc_sync_pmtu(asoc);
2244 } else if (asoc) { 2244 } else if (asoc) {
2245 asoc->pathmtu = params->spp_pathmtu; 2245 asoc->pathmtu = params->spp_pathmtu;
2246 sctp_frag_point(sp, params->spp_pathmtu); 2246 sctp_frag_point(asoc, params->spp_pathmtu);
2247 } else { 2247 } else {
2248 sp->pathmtu = params->spp_pathmtu; 2248 sp->pathmtu = params->spp_pathmtu;
2249 } 2249 }
@@ -2880,15 +2880,10 @@ static int sctp_setsockopt_maxseg(struct sock *sk, char __user *optval, int optl
2880 val -= sizeof(struct sctphdr) + 2880 val -= sizeof(struct sctphdr) +
2881 sizeof(struct sctp_data_chunk); 2881 sizeof(struct sctp_data_chunk);
2882 } 2882 }
2883 2883 asoc->user_frag = val;
2884 asoc->frag_point = val; 2884 asoc->frag_point = sctp_frag_point(asoc, asoc->pathmtu);
2885 } else { 2885 } else {
2886 sp->user_frag = val; 2886 sp->user_frag = val;
2887
2888 /* Update the frag_point of the existing associations. */
2889 list_for_each_entry(asoc, &(sp->ep->asocs), asocs) {
2890 asoc->frag_point = sctp_frag_point(sp, asoc->pathmtu);
2891 }
2892 } 2887 }
2893 2888
2894 return 0; 2889 return 0;