aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorWei Yongjun <yjwei@cn.fujitsu.com>2011-03-31 19:38:54 -0400
committerDavid S. Miller <davem@davemloft.net>2011-04-02 00:45:50 -0400
commit028dba0ac3fc3c82da06110b011fce22a5ffad00 (patch)
tree1285e03640f24a834fcb249af4dcbff9e8943f58 /include
parent4dd5ffe4fc36128dc86568ddeaeae359e6037762 (diff)
sctp: fix auth_hmacs field's length of struct sctp_cookie
auth_hmacs field of struct sctp_cookie is used for store Requested HMAC Algorithm Parameter, and each HMAC Identifier is 2 bytes, so the length should be: SCTP_AUTH_NUM_HMACS * sizeof(__u16) + 2 Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/sctp/structs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index cc9185ca8fd1..0f6e60a9c308 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -422,7 +422,7 @@ struct sctp_cookie {
422 __u32 adaptation_ind; 422 __u32 adaptation_ind;
423 423
424 __u8 auth_random[sizeof(sctp_paramhdr_t) + SCTP_AUTH_RANDOM_LENGTH]; 424 __u8 auth_random[sizeof(sctp_paramhdr_t) + SCTP_AUTH_RANDOM_LENGTH];
425 __u8 auth_hmacs[SCTP_AUTH_NUM_HMACS + 2]; 425 __u8 auth_hmacs[SCTP_AUTH_NUM_HMACS * sizeof(__u16) + 2];
426 __u8 auth_chunks[sizeof(sctp_paramhdr_t) + SCTP_AUTH_MAX_CHUNKS]; 426 __u8 auth_chunks[sizeof(sctp_paramhdr_t) + SCTP_AUTH_MAX_CHUNKS];
427 427
428 /* This is a shim for my peer's INIT packet, followed by 428 /* This is a shim for my peer's INIT packet, followed by