On Thu, Oct 05, 2006 at 02:57:51PM -0700, Jouni Malinen wrote:
> 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..

        Obviously. John's code was only a proof of concept, tested
patch is coming in another e-mail.

> 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'..

        I think we will have to suffer a bit. After the big mess
created by the whole story, I think it might not be a bad idea to get
90% of the way there, and add the remaining 10% of a later date. At
the rate userspace is progressing, it's only a matter of weeks.

> Jouni Malinen

        Have fun...

        Jean

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to