[PATCH] [updated again] encodeext vs. encode codepaths
Thu Feb 2 17:56:11 PST 2006
On Thu, 2006-02-02 at 11:10 -0500, Dan Williams wrote:
> On Wed, 2006-02-01 at 21:24 -0800, Jouni Malinen wrote:
> > On Thu, Feb 02, 2006 at 12:07:58AM -0500, Dan Williams wrote:
> > > The proposed patch is attached. I also corrected invalid usage of the
> > > IW_ENCODE_MODE mask in driver_wext.c from the original patch. I had
> > > been using it as a flag, not a mask.
> > Thanks! I haven't yet had a chance to look at the details, but I'll try
> > to do that over the weekend. Just a quick note on one of the changes:
> > it is highly preferred that the driver wrapper API defined in driver.h
> > remains backwards compatible at source code level (i.e., does not
> > require changing driver_*.c files).
> Yeah, I was looking for another way that wasn't a hack, but couldn't
> fine one. Likely I'm not as familiar with the source. I don't like
> breaking API, but I'm not sure of another way to do set_auth_alg()
> fallback without passing use_crypt into the set_auth_alg() handler.
> > In other words, the change to set_auth_alg() handler is not desired. The
> > preferred way of adding new parameters for association is to add a new
> > field into struct wpa_driver_associate_params that will be passed
> > associate() handler. This allows adding new parameters without breaking
> > source level compatibility with driver wrapper implementations.
> For the above reasons, it would be messy to punt the auth_alg fallback
> stuff into associate() handler. You've got a problem here then; the
> SIOCSIWAUTH codepath auth_alg goes through set_auth_alg(), but the
> ENCODE-fallback codepath is in associate().
> The root of the problem is:
> 1) wpa_supplicant was not setting authentication algorithm at _all_ for
> cards that don't support SIOCSIWAUTH
> 2) To fall back to ENCODE, you need to know whether encryption will be
> enabled or disabled so you can add the IW_ENCODE_DISABLED flag before
> calling ENCODE. There was no way to pass this into set_auth_alg(),
> because set_auth_alg() is just an 'int' for the algorithm.
> Hopefully you can come up with something clever here, but at the point
> we set the auth on the card using ENCODE, we need to know whether
> encryption will be enabled or not.
> -- Expand wpa_driver_associate_params to include a
> "delayed_auth_fallback" flag, which is set in set_auth_alg() and
> actually processed in authenticate().
> If that sounds good, I'll do a patch for that instead. Sounds like a
> kludge, but would preserve backward source compatibility.
3rd try at this patch, this one doesn't change driver source API.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3748 bytes
Desc: not available
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20060202/c81ecfb2/attachment.bin
More information about the Hostap