aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/sm_statefuns.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index d247ed4ee423..b6aaa7e97d82 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -3377,6 +3377,15 @@ sctp_disposition_t sctp_sf_do_asconf(const struct sctp_endpoint *ep,
3377 return sctp_sf_pdiscard(ep, asoc, type, arg, commands); 3377 return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
3378 } 3378 }
3379 3379
3380 /* ADD-IP: Section 4.1.1
3381 * This chunk MUST be sent in an authenticated way by using
3382 * the mechanism defined in [I-D.ietf-tsvwg-sctp-auth]. If this chunk
3383 * is received unauthenticated it MUST be silently discarded as
3384 * described in [I-D.ietf-tsvwg-sctp-auth].
3385 */
3386 if (!sctp_addip_noauth && !chunk->auth)
3387 return sctp_sf_discard_chunk(ep, asoc, type, arg, commands);
3388
3380 /* Make sure that the ASCONF ADDIP chunk has a valid length. */ 3389 /* Make sure that the ASCONF ADDIP chunk has a valid length. */
3381 if (!sctp_chunk_length_valid(chunk, sizeof(sctp_addip_chunk_t))) 3390 if (!sctp_chunk_length_valid(chunk, sizeof(sctp_addip_chunk_t)))
3382 return sctp_sf_violation_chunklen(ep, asoc, type, arg, 3391 return sctp_sf_violation_chunklen(ep, asoc, type, arg,
@@ -3463,6 +3472,15 @@ sctp_disposition_t sctp_sf_do_asconf_ack(const struct sctp_endpoint *ep,
3463 return sctp_sf_pdiscard(ep, asoc, type, arg, commands); 3472 return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
3464 } 3473 }
3465 3474
3475 /* ADD-IP, Section 4.1.2:
3476 * This chunk MUST be sent in an authenticated way by using
3477 * the mechanism defined in [I-D.ietf-tsvwg-sctp-auth]. If this chunk
3478 * is received unauthenticated it MUST be silently discarded as
3479 * described in [I-D.ietf-tsvwg-sctp-auth].
3480 */
3481 if (!sctp_addip_noauth && !asconf_ack->auth)
3482 return sctp_sf_discard_chunk(ep, asoc, type, arg, commands);
3483
3466 /* Make sure that the ADDIP chunk has a valid length. */ 3484 /* Make sure that the ADDIP chunk has a valid length. */
3467 if (!sctp_chunk_length_valid(asconf_ack, sizeof(sctp_addip_chunk_t))) 3485 if (!sctp_chunk_length_valid(asconf_ack, sizeof(sctp_addip_chunk_t)))
3468 return sctp_sf_violation_chunklen(ep, asoc, type, arg, 3486 return sctp_sf_violation_chunklen(ep, asoc, type, arg,