diff options
Diffstat (limited to 'net/sctp/chunk.c')
-rw-r--r-- | net/sctp/chunk.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/sctp/chunk.c b/net/sctp/chunk.c index ce8087846f05..d2048de86e7c 100644 --- a/net/sctp/chunk.c +++ b/net/sctp/chunk.c | |||
@@ -191,6 +191,12 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc, | |||
191 | * the packet | 191 | * the packet |
192 | */ | 192 | */ |
193 | max_data = asoc->frag_point; | 193 | max_data = asoc->frag_point; |
194 | if (unlikely(!max_data)) { | ||
195 | max_data = sctp_min_frag_point(sctp_sk(asoc->base.sk), | ||
196 | sctp_datachk_len(&asoc->stream)); | ||
197 | pr_warn_ratelimited("%s: asoc:%p frag_point is zero, forcing max_data to default minimum (%Zu)", | ||
198 | __func__, asoc, max_data); | ||
199 | } | ||
194 | 200 | ||
195 | /* If the the peer requested that we authenticate DATA chunks | 201 | /* If the the peer requested that we authenticate DATA chunks |
196 | * we need to account for bundling of the AUTH chunks along with | 202 | * we need to account for bundling of the AUTH chunks along with |