diff options
author | Vlad Yasevich <vladislav.yasevich@hp.com> | 2007-11-29 08:56:16 -0500 |
---|---|---|
committer | Vlad Yasevich <vladislav.yasevich@hp.com> | 2007-11-29 10:17:42 -0500 |
commit | 555d3d5d2be13675490a80df0d7961551822ef1f (patch) | |
tree | 1ff1e56519885c0dfb5b5b79aa141792ea68d7ae /net/sctp | |
parent | 8ee4be37e8ac28e79ae673d441e83c1f51e7ecfd (diff) | |
download | linux-555d3d5d2be13675490a80df0d7961551822ef1f.tar.gz linux-555d3d5d2be13675490a80df0d7961551822ef1f.tar.bz2 linux-555d3d5d2be13675490a80df0d7961551822ef1f.zip |
SCTP: Fix chunk acceptance when no authenticated chunks were listed.
In the case where no autheticated chunks were specified, we were still
trying to verify that a given chunk needs authentication and doing so
incorrectly. Add a check for parameter length to make sure we don't
try to use an empty auth_chunks parameter to verify against.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/auth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sctp/auth.c b/net/sctp/auth.c index 6d5fa6bb371b..6d89e35307aa 100644 --- a/net/sctp/auth.c +++ b/net/sctp/auth.c @@ -631,7 +631,7 @@ static int __sctp_auth_cid(sctp_cid_t chunk, struct sctp_chunks_param *param) int found = 0; int i; - if (!param) + if (!param || param->param_hdr.length == 0) return 0; len = ntohs(param->param_hdr.length) - sizeof(sctp_paramhdr_t); |