2016-06-15 14:18:06

by Vincent CESSON

[permalink] [raw]
Subject: Re: mwifiex+wpa_supplicant cannot set up WPA/WPA2 ADHOC

I set a successful AP network with WPA-PSK (see conf and log attached).
As you can see on log, the message "Could not set station
48:45:20:3b:31:75 flags for kernel driver" appears too, but the
connection is OK.



Le 2016-06-15 13:35, Raymond Hayes a écrit :
> The logs were from wpa_supplicant so I suggest starting there; but
> the problem could be on either side, so you'll probably have to look
> into mwiflex too.
>
> Ray
>
> On Wednesday, June 15, 2016, Vincent CESSON <[email protected]>
> wrote:
>
>> Hi Raymond,
>>
>> Who is trying to mark the peer authorized? Should I look into mwifiex
>> driver? cfg80211.ko? libnl? wpa_supplicant? I am a bit lost among all
>> these elements.
>>
>> Vincent
>>
>> Le 2016-06-14 02:30, Raymond Hayes a écrit :
>>
>>> From the RSN log, the dual 4-way handshakes succeeded, but the GTK
>>> was
>>> not installed:
>>>
>>> nl80211: set_key failed; err=-22 Invalid argument)
>>>
>>> and it looks like there was a problem marking the peer authorized:
>>>
>>> AUTH: 48:45:20:3b:31:75 authorizing port
>>> Could not set station 48:45:20:3b:31:75 flags for kernel driver
>>> (errno=11)
>>>
>>> Ray
>>>
>>> On Mon, Jun 13, 2016 at 7:42 AM, Vincent CESSON
>>> <[email protected]> wrote:
>>>
>>>> Hi Amitkumar,
>>>>
>>>> Here are the wpa_supplicant logs (with CONFIG_IBSS_RSN=y enabled)
>>>> from the
>>>> two devices. Beside wpa_supplicant, I manually set IPs 192.168.1.xy
>>>> with
>>>> command "ifconfig mlan0 192.168.1.xy" and then I try to ping each
>>>> other,
>>>> without success.
>>>>
>>>> Vincent
>>>>
>>>> Le 2016-06-13 15:40, Amitkumar Karwar a écrit :
>>>>
>>>>> Hi Vincent,
>>>>>
>>>>>> From: Vincent CESSON [mailto:[email protected]]
>>>>>> Sent: Monday, June 13, 2016 7:09 PM
>>>>>> To: Amitkumar Karwar
>>>>>> Cc: Raymond Hayes; [email protected]
>>>>>> Subject: RE: mwifiex+wpa_supplicant cannot set up WPA/WPA2 ADHOC
>>>>>>
>>>>>> About the strange behaviour with the two devices connecting
>>>>>> despite the
>>>>>> bad passwords, I made a little mistake: on the device 2,
>>>>>> wpa_supplicant
>>>>>> was not built with option CONFIG_IBSS_RSN=y. But still, device 1
>>>>>> should
>>>>>> not accept device 2...
>>>>>>
>>>>>> Note that with option CONFIG_IBSS_RSN=y enabled on both devices,
>>>>>> WPA-PSK
>>>>>> connection does not work, even with the right password...
>>>>>
>>>>> I see. Please share the wpa_supplicant logs with CONFIG_IBSS_RSN=y
>>>>> enabled for analysis.
>>>>>
>>>>> Regards,
>>>>> Amitkumar


Attachments:
hostapd-rsn.conf (188.00 B)
hostapd-rsn.log (5.93 kB)
Download all attachments

2016-06-15 16:18:02

by Raymond Hayes

[permalink] [raw]
Subject: Re: mwifiex+wpa_supplicant cannot set up WPA/WPA2 ADHOC

I'm not sure what to tell you. Did you look into the GTK installation
failure? For WPA-PSK, there's 1 4-way handshake and the STA installs
1 PTK and 1 GTK. For WPA2-PSK for IBSS, there are 2 4-way handshakes
and the STA installs 1 PTK and 2 GTKs. If the peer's GTK isn't
installed, the STA won't be able to decrypt the peer's broadcast
frames. Do you have a sniff of the failure? What's failing? Does it
work if you use static IP addresses and static ARP entries?

Ray

On Wed, Jun 15, 2016 at 7:17 AM, Vincent CESSON <[email protected]> wrote:
> I set a successful AP network with WPA-PSK (see conf and log attached). As
> you can see on log, the message "Could not set station 48:45:20:3b:31:75
> flags for kernel driver" appears too, but the connection is OK.
>
>
>
>
> Le 2016-06-15 13:35, Raymond Hayes a écrit :
>>
>> The logs were from wpa_supplicant so I suggest starting there; but
>> the problem could be on either side, so you'll probably have to look
>> into mwiflex too.
>>
>> Ray
>>
>> On Wednesday, June 15, 2016, Vincent CESSON <[email protected]>
>> wrote:
>>
>>> Hi Raymond,
>>>
>>> Who is trying to mark the peer authorized? Should I look into mwifiex
>>> driver? cfg80211.ko? libnl? wpa_supplicant? I am a bit lost among all these
>>> elements.
>>>
>>> Vincent
>>>
>>> Le 2016-06-14 02:30, Raymond Hayes a écrit :
>>>
>>>> From the RSN log, the dual 4-way handshakes succeeded, but the GTK was
>>>> not installed:
>>>>
>>>> nl80211: set_key failed; err=-22 Invalid argument)
>>>>
>>>> and it looks like there was a problem marking the peer authorized:
>>>>
>>>> AUTH: 48:45:20:3b:31:75 authorizing port
>>>> Could not set station 48:45:20:3b:31:75 flags for kernel driver
>>>> (errno=11)
>>>>
>>>> Ray
>>>>
>>>> On Mon, Jun 13, 2016 at 7:42 AM, Vincent CESSON
>>>> <[email protected]> wrote:
>>>>
>>>>> Hi Amitkumar,
>>>>>
>>>>> Here are the wpa_supplicant logs (with CONFIG_IBSS_RSN=y enabled) from
>>>>> the
>>>>> two devices. Beside wpa_supplicant, I manually set IPs 192.168.1.xy
>>>>> with
>>>>> command "ifconfig mlan0 192.168.1.xy" and then I try to ping each
>>>>> other,
>>>>> without success.
>>>>>
>>>>> Vincent
>>>>>
>>>>> Le 2016-06-13 15:40, Amitkumar Karwar a écrit :
>>>>>
>>>>>> Hi Vincent,
>>>>>>
>>>>>>> From: Vincent CESSON [mailto:[email protected]]
>>>>>>> Sent: Monday, June 13, 2016 7:09 PM
>>>>>>> To: Amitkumar Karwar
>>>>>>> Cc: Raymond Hayes; [email protected]
>>>>>>> Subject: RE: mwifiex+wpa_supplicant cannot set up WPA/WPA2 ADHOC
>>>>>>>
>>>>>>> About the strange behaviour with the two devices connecting despite
>>>>>>> the
>>>>>>> bad passwords, I made a little mistake: on the device 2,
>>>>>>> wpa_supplicant
>>>>>>> was not built with option CONFIG_IBSS_RSN=y. But still, device 1
>>>>>>> should
>>>>>>> not accept device 2...
>>>>>>>
>>>>>>> Note that with option CONFIG_IBSS_RSN=y enabled on both devices,
>>>>>>> WPA-PSK
>>>>>>> connection does not work, even with the right password...
>>>>>>
>>>>>>
>>>>>> I see. Please share the wpa_supplicant logs with CONFIG_IBSS_RSN=y
>>>>>> enabled for analysis.
>>>>>>
>>>>>> Regards,
>>>>>> Amitkumar