aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/sctp/sm_statefuns.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index fe2036d79f53..194d5ecab5c3 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -2412,8 +2412,15 @@ static sctp_disposition_t __sctp_sf_do_9_1_abort(const struct sctp_endpoint *ep,
2412 2412
2413 /* See if we have an error cause code in the chunk. */ 2413 /* See if we have an error cause code in the chunk. */
2414 len = ntohs(chunk->chunk_hdr->length); 2414 len = ntohs(chunk->chunk_hdr->length);
2415 if (len >= sizeof(struct sctp_chunkhdr) + sizeof(struct sctp_errhdr)) 2415 if (len >= sizeof(struct sctp_chunkhdr) + sizeof(struct sctp_errhdr)) {
2416
2417 sctp_errhdr_t *err;
2418 sctp_walk_errors(err, chunk->chunk_hdr);
2419 if ((void *)err != (void *)chunk->chunk_end)
2420 return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
2421
2416 error = ((sctp_errhdr_t *)chunk->skb->data)->cause; 2422 error = ((sctp_errhdr_t *)chunk->skb->data)->cause;
2423 }
2417 2424
2418 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, SCTP_ERROR(ECONNRESET)); 2425 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, SCTP_ERROR(ECONNRESET));
2419 /* ASSOC_FAILED will DELETE_TCB. */ 2426 /* ASSOC_FAILED will DELETE_TCB. */