Search Linux Wireless

Re: [PATCH] Re: [ipw3945-devel] iwl3945/mac80211 cannot connect to dynamic wep network

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> ieee80211_ioctl_siwauth in ieee80211_ioctl.c sets the 
> key_management_enabled variable if the value passed to the ioctl is not 
> 0 to true:
> sdata->u.sta.key_management_enabled = !!data->value;
> why !!data->value ?  that should be the same as data->value ...

Nope. Think again :) !! normalises to 0/1 rather than 0/!=0

> now to wpa_supplicant:
> wpa_driver_wext_keymgmt2wext in driver_wext.c  returns 
> IW_AUTH_KEY_MGMT_802_1 (which is defined as 1) (when dynamic wep is 
> used) wpa_driver_wext_set_auth_param than passes the value using 
> ioctl(drv->ioctl_sock, SIOCSIWAUTH, &iwr) to mac80211.

Are you sure it returns IW_AUTH_KEY_MGMT_802_1(X)? My assumption was
that this is what goes wrong.

> ieee80211_privacy_mismatch checks for
> if (!ifsta || (ifsta->flags & IEEE80211_STA_MIXED_CELL) ||
>         ifsta->key_management_enabled)
> 
> and returns 0 because ifsta->key_management_enabled  true in this case 
> !!1 -> 1

Which is fine, privacy_mismatch() returns 0 if there's no "mismatch" and
we should hence proceed with the association.

> so the attached patch should fix it by doing !data->value (which would 
> result in ifsta->key_management_enabled to be 0 here and therefor 
> ieee80211_privacy_mismatch won't return 0).

That's bogus, you misunderstood the return value of privacy_mismatch()

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux