diff options
Diffstat (limited to 'net/sctp/auth.c')
| -rw-r--r-- | net/sctp/auth.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sctp/auth.c b/net/sctp/auth.c index 6d5fa6bb371b..97e6ebd14500 100644 --- a/net/sctp/auth.c +++ b/net/sctp/auth.c | |||
| @@ -54,11 +54,13 @@ static struct sctp_hmac sctp_hmac_list[SCTP_AUTH_NUM_HMACS] = { | |||
| 54 | /* id 2 is reserved as well */ | 54 | /* id 2 is reserved as well */ |
| 55 | .hmac_id = SCTP_AUTH_HMAC_ID_RESERVED_2, | 55 | .hmac_id = SCTP_AUTH_HMAC_ID_RESERVED_2, |
| 56 | }, | 56 | }, |
| 57 | #if defined (CONFIG_CRYPTO_SHA256) || defined (CONFIG_CRYPTO_SHA256_MODULE) | ||
| 57 | { | 58 | { |
| 58 | .hmac_id = SCTP_AUTH_HMAC_ID_SHA256, | 59 | .hmac_id = SCTP_AUTH_HMAC_ID_SHA256, |
| 59 | .hmac_name="hmac(sha256)", | 60 | .hmac_name="hmac(sha256)", |
| 60 | .hmac_len = SCTP_SHA256_SIG_SIZE, | 61 | .hmac_len = SCTP_SHA256_SIG_SIZE, |
| 61 | } | 62 | } |
| 63 | #endif | ||
| 62 | }; | 64 | }; |
| 63 | 65 | ||
| 64 | 66 | ||
| @@ -631,7 +633,7 @@ static int __sctp_auth_cid(sctp_cid_t chunk, struct sctp_chunks_param *param) | |||
| 631 | int found = 0; | 633 | int found = 0; |
| 632 | int i; | 634 | int i; |
| 633 | 635 | ||
| 634 | if (!param) | 636 | if (!param || param->param_hdr.length == 0) |
| 635 | return 0; | 637 | return 0; |
| 636 | 638 | ||
| 637 | len = ntohs(param->param_hdr.length) - sizeof(sctp_paramhdr_t); | 639 | len = ntohs(param->param_hdr.length) - sizeof(sctp_paramhdr_t); |
