Linux wireless drivers development
 help / color / mirror / Atom feed
From: "Tomas Winkler" <tomasw@gmail.com>
To: "Johannes Berg" <johannes@sipsolutions.net>
Cc: drago01 <drago01@gmail.com>,
	linville@tuxdriver.com, yi.zhu@intel.com,
	linux-wireless@vger.kernel.org,
	"Emmanuel Grumbach" <emmanuel.grumbach@intel.com>
Subject: Re: [PATCH 1/1] mac80211: don't accept WEP keys other than WEP40 and WEP104
Date: Sun, 29 Jun 2008 12:57:16 +0300	[thread overview]
Message-ID: <1ba2fa240806290257r1db0e021n152945d41ffe2f42@mail.gmail.com> (raw)
In-Reply-To: <1214639847.5507.6.camel@johannes.berg>

On Sat, Jun 28, 2008 at 10:57 AM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Sat, 2008-06-28 at 08:46 +0200, drago01 wrote:
>
>> > +/**
>> > + * enum ieee80211_key_len - key length
>> > + * @WEP40: WEP 5 byte long key
>> > + * @WEP104: WEP 13 byte long key
>> > + */
>> > +enum ieee80211_key_len {
>> > +       LEN_WEP40 = 5,
>> > +       LEN_WEP104 = 13,
>> > +};
>
>
>> > +               if (alg == ALG_WEP &&
>
>> What about 0 ?
>> See http://marc.info/?l=linux-wireless&m=121458316301507&w=2
>
>
> I don't think zero-keylen will have WEP there, will it? I don't really
> know though.

This patch  pushes the length check to ieee80211_set_encryption.
Unlike John's patch
where check was done in ieee80211_ioctl_siwencode.
The benefit of this is that both ENCODE end ENCODEEXT are treated.
The zero length key i.e. changing index is already taken care of in
ieee80211_ioctl_siwencode

<snip>
if (erq->flags & IW_ENCODE_DISABLED)
		remove = 1;
else if (erq->length == 0) {
		/* No key data - just set the default TX key index */
		ieee80211_set_default_key(sdata, idx);
		return 0;
}
</snip>

Tomas

  reply	other threads:[~2008-06-29  9:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-27 23:50 [PATCH 1/1] mac80211: don't accept WEP keys other than WEP40 and WEP104 Tomas Winkler
2008-06-28  6:46 ` drago01
2008-06-28  7:57   ` Johannes Berg
2008-06-29  9:57     ` Tomas Winkler [this message]
2008-06-30  9:25       ` Johannes Berg

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=1ba2fa240806290257r1db0e021n152945d41ffe2f42@mail.gmail.com \
    --to=tomasw@gmail.com \
    --cc=drago01@gmail.com \
    --cc=emmanuel.grumbach@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=yi.zhu@intel.com \
    /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