mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Julia Lawall <julia@diku.dk>
To: gregkh@suse.de, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: p80211wext.c: possible problem with IW_ENCODE_ALG_WEP
Date: Tue, 5 May 2009 13:30:53 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0905051330150.9552@pc-004.diku.dk> (raw)

The file drivers/staging/wlan-ng/p80211wext.c contains the following code:

(starting at line 1490 in a recent linux-next)

		if (!(ext->alg & IW_ENCODE_ALG_WEP)) {
			pr_debug("asked to set a non wep key :(");
			return -EINVAL;
		}

The reference to IW_ENCODE_ALG_WEP seems to refer to the following
definitions in include/linux/wireless.h

/* struct iw_encode_ext ->alg */
#define IW_ENCODE_ALG_NONE	0
#define IW_ENCODE_ALG_WEP	1
#define IW_ENCODE_ALG_TKIP	2
#define IW_ENCODE_ALG_CCMP	3
#define IW_ENCODE_ALG_PMK	4
#define IW_ENCODE_ALG_AES_CMAC	5

But if the alg field returns true for a bit and with IW_ENCODE_ALG_WEP,
then it would also return true for a bit and with IW_ENCODE_ALG_CCMP and
IW_ENCODE_ALG_AES_CMAC.  Is this what is intended, or should the test be
encoded in another way?

julia

             reply	other threads:[~2009-05-05 11:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-05 11:30 Julia Lawall [this message]
2009-05-05 12:48 ` Richard Kennedy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0905051330150.9552@pc-004.diku.dk \
    --to=julia@diku.dk \
    --cc=gregkh@suse.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®