]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
SCTP: Fix chunk acceptance when no authenticated chunks were listed.
authorVlad Yasevich <vladislav.yasevich@hp.com>
Thu, 29 Nov 2007 13:56:16 +0000 (08:56 -0500)
committerVlad Yasevich <vladislav.yasevich@hp.com>
Thu, 29 Nov 2007 15:17:42 +0000 (10:17 -0500)
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>
net/sctp/auth.c

index 6d5fa6bb371b0ce2d85a77093092ac440d93684a..6d89e35307aa94393dbbae4a5032865b574e7cdf 100644 (file)
@@ -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);