From: David S. Miller Date: Thu, 22 May 2008 00:36:21 +0000 (-0700) Subject: xfrm_user: Remove zero length key checks. X-Git-Tag: v2.6.26-rc4~70^2~2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=88860c9ef45963eb69411b0d2ace4e8ba0f7a32f;p=linux-2.6-omap-h63xx.git xfrm_user: Remove zero length key checks. 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 Acked-by: Herbert Xu --- diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index a1b0fbe3ea3..b976d9ed10e 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -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: