diff options
Diffstat (limited to 'net/sctp/chunk.c')
-rw-r--r-- | net/sctp/chunk.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/sctp/chunk.c b/net/sctp/chunk.c index 77fb7b06a9c4..619d0f2dee51 100644 --- a/net/sctp/chunk.c +++ b/net/sctp/chunk.c | |||
@@ -194,6 +194,18 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc, | |||
194 | 194 | ||
195 | max = asoc->frag_point; | 195 | max = asoc->frag_point; |
196 | 196 | ||
197 | /* If the the peer requested that we authenticate DATA chunks | ||
198 | * we need to accound for bundling of the AUTH chunks along with | ||
199 | * DATA. | ||
200 | */ | ||
201 | if (sctp_auth_send_cid(SCTP_CID_DATA, asoc)) { | ||
202 | struct sctp_hmac *hmac_desc = sctp_auth_asoc_get_hmac(asoc); | ||
203 | |||
204 | if (hmac_desc) | ||
205 | max -= WORD_ROUND(sizeof(sctp_auth_chunk_t) + | ||
206 | hmac_desc->hmac_len); | ||
207 | } | ||
208 | |||
197 | whole = 0; | 209 | whole = 0; |
198 | first_len = max; | 210 | first_len = max; |
199 | 211 | ||