All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jouni Malinen" <jkm@devicescape.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: Jean Tourrilhes <jt@hpl.hp.com>, Andrew Morton <akpm@osdl.org>,
	netdev@vger.kernel.org, jeff@garzik.org
Subject: Re: Request to postpone WE-21
Date: Thu, 5 Oct 2006 14:57:51 -0700	[thread overview]
Message-ID: <20061005215751.GI17517@instant802.com> (raw)
In-Reply-To: <20061005204949.GF18408@tuxdriver.com>

On Thu, Oct 05, 2006 at 04:49:54PM -0400, John W. Linville wrote:

> What about a patch like the one below?  It tries to detect WE-20
> ESSID/NICKN accesses and adjust them to WE-21 style.  What am
> I missing?

> diff --git a/net/core/wireless.c b/net/core/wireless.c

> +			else if (IW_IS_SET(cmd)) {
> +				char essid[IW_ESSID_MAX_SIZE + 1];
> +
> +				err = copy_from_user(essid, iwr->u.data.pointer,
> +						     iwr->u.data.length *
> +						     descr->token_size);

> +				if (essid[iwr->u.data.length] == '\0')
> +					essid_compat = 1;

This looks somewhat confusing.. WE-20 (and older) included '\0' in both
the data value and length (well, at least in most drivers and user space
tools, if I remember correctly), i.e., essid[iwr->u.data.length] would
be pointing one byte after the '\0' termination.. And since '\0' is
valid character in SSID (it is just an arbitrary array of octets) it can
also be the last octet of the SSID and WE-21 style case could have
essid[iwr->u.data.length - 1] == '\0'..

-- 
Jouni Malinen                                            PGP id EFC895FA

  parent reply	other threads:[~2006-10-05 21:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-05 16:31 Request to postpone WE-21 Jean Tourrilhes
2006-10-05 20:49 ` John W. Linville
2006-10-05 21:21   ` Jean Tourrilhes
2006-10-05 21:57   ` Jouni Malinen [this message]
2006-10-05 22:07     ` Jean Tourrilhes
2006-10-05 22:37     ` Jeff Garzik
2006-10-05 22:12   ` Jean Tourrilhes
2006-10-05 22:15     ` Jouni Malinen
2006-10-05 22:20       ` Jean Tourrilhes
2006-10-10 19:40     ` John W. Linville
2006-10-10 20:28       ` Jean Tourrilhes
2006-10-19 21:56         ` Please pull 'we21-fix' branch of wireless-2.6.git John W. Linville
2006-10-19 22:10           ` Jean Tourrilhes
2006-10-21 18:12           ` Jeff Garzik

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=20061005215751.GI17517@instant802.com \
    --to=jkm@devicescape.com \
    --cc=akpm@osdl.org \
    --cc=jeff@garzik.org \
    --cc=jt@hpl.hp.com \
    --cc=linville@tuxdriver.com \
    --cc=netdev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.