On Mon, 2008-09-15 at 17:56 +0200, Johannes Berg wrote: > > + if (sdata->vif.type == IEEE80211_IF_TYPE_STA) { > > + struct ieee80211_if_sta *ifsta = &sdata->u.sta; > > + if (erq->flags & IW_ENCODE_OPEN) { > > + printk("wext: open\n"); > > + ifsta->auth_alg = WLAN_AUTH_OPEN; > > + } > > + else if (erq->flags & IW_ENCODE_RESTRICTED) { > > + printk("wext: shared key\n"); > > + ifsta->auth_alg = WLAN_AUTH_SHARED_KEY; > > + > > Come to think of it, since we already fall back from open to shared-key > when the AP rejects, why would we want to support this at all? The > semantics aren't well defined enough to support it _properly_, that is > have it change the ifsta->auth_algs variable, and touching this variable > as you're doing in these two patches is just plain wrong since it can be > changed underneath (yes, you're removing the automatic changing, but > that's totally wrong). Then again, I suppose you _can_ actually implement this, but in terms of which authentication algorithms are allowed, something like: if (erq->flags & RESTRICTED) ifsta->auth_algs = SHARED; else ifsta->auth_algs = OPEN | SHARED | LEAP; johannes
Attachment:
signature.asc
Description: This is a digitally signed message part