Skip to content

Commit

Permalink
xfrm_user: Remove zero length key checks.
Browse files Browse the repository at this point in the history
The crypto layer will determine whether that is valid
or not.

Suggested by Herbert Xu, based upon a report and patch
by Martin Willi.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
David S. Miller committed May 22, 2008
1 parent 51f82a2 commit 88860c9
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions net/xfrm/xfrm_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,8 @@ static int verify_one_alg(struct nlattr **attrs, enum xfrm_attr_type_t type)

switch (type) {
case XFRMA_ALG_AUTH:
if (!algp->alg_key_len &&
strcmp(algp->alg_name, "digest_null") != 0)
return -EINVAL;
break;

case XFRMA_ALG_CRYPT:
if (!algp->alg_key_len &&
strcmp(algp->alg_name, "cipher_null") != 0)
return -EINVAL;
break;

case XFRMA_ALG_COMP:
/* Zero length keys are legal. */
break;

default:
Expand Down

0 comments on commit 88860c9

Please sign in to comment.