From chaitanya.mgit at gmail.com  Sun Nov  1 01:55:33 2015
From: chaitanya.mgit at gmail.com (Krishna Chaitanya)
Date: Sun, 1 Nov 2015 14:25:33 +0530
Subject: MCC p2p_connect op channel selection
In-Reply-To: <20151031162414.GB25567@w1.fi>
References: <CABPxzY+bjeuHZuEkR=t3qw63bknkiuX1ouQzbYx2fWe+eJYaKA@mail.gmail.com>
 <20151031162414.GB25567@w1.fi>
Message-ID: <CABPxzYK6i29M-ywA2UfhWiEgPcMKyxuhdUcb2smo8qdDtcEjSA@mail.gmail.com>

On Sat, Oct 31, 2015 at 9:54 PM, Jouni Malinen <j at w1.fi> wrote:
> On Fri, Oct 30, 2015 at 08:59:51PM +0530, Krishna Chaitanya wrote:
>> When STA-VIF is connected to AP: Channel 10
>>
>> with p2p_oper_channel=1, using p2p_connect with go_intent=15, the
>> Group is starting in channel 10 even though the driver is MCC capable.
>
> p2p_oper_channel parameter should not be used for any production use
> case. If you want to specify the operating channel, use the freq=<MHz>
> argument with P2P_CONNECT.

Ok, can we document this somewhere?

>> So we have added "p2p_ignore_shared_freq" to the config file, still
>> the same behavior is seen.

> That should work if you specify the operating channel with the
> P2P_CONNECT command.
>
>> What is the ideal solution?
>>
>> 1) Change wpas_p2p_setup_freqs to take cfg->op_channel as highest priority.
>
> No, p2p_oper_channel configuration parameter should not be used for
> anything. The only potentially acceptable change would be to remove it
> completely from wpa_supplicant, but I don't want to do that since it may
> break parsing of existing configuration files.
>
>> 2) Make the pref_freq 0  (similar thing is done for invite case), but
>> still the op_channel in config file is not honored.
>> 3) Make the pref_freq=cfg->op_channel.
>
> 4) Use the documented (wpa_supplicant/README-P2P) freq parameter to
> p2p_connect.
A



-- 
Thanks,
Regards,
Chaitanya T K.


From ilan.peer at intel.com  Sun Nov  1 06:20:43 2015
From: ilan.peer at intel.com (Peer, Ilan)
Date: Sun, 1 Nov 2015 14:20:43 +0000
Subject: [PATCH 13/14] ctrl: Enable adding profiles for P2P device
 interface
In-Reply-To: <20151031212841.GD9636@w1.fi>
References: <1444837400-17309-1-git-send-email-ilan.peer@intel.com>
 <1444837400-17309-14-git-send-email-ilan.peer@intel.com>
 <20151016174939.GH23614@w1.fi>
 <CB3B3D4774441E42AA3EA0E1BA8230A04DC14C7C@HASMSX110.ger.corp.intel.com>
 <20151031212841.GD9636@w1.fi>
Message-ID: <CB3B3D4774441E42AA3EA0E1BA8230A04DC2A399@HASMSX110.ger.corp.intel.com>

Hi Jouni,

> -----Original Message-----
> From: Jouni Malinen [mailto:j at w1.fi]
> Sent: Saturday, October 31, 2015 23:29
> To: Peer, Ilan
> Cc: hostap at lists.infradead.org; Stern, Avraham
> Subject: Re: [PATCH 13/14] ctrl: Enable adding profiles for P2P device
> interface
> 
> On Thu, Oct 22, 2015 at 02:12:09PM +0000, Peer, Ilan wrote:
> > > > Redirect the commands ADD_NETWORK and SET_NETWORK from the
> global
> > > > control interface to the P2P Device interface to enable adding
> > > > netwrok profiles to the P2P Device interface.
> 
> > These were under CONFIG_TESTING_OPTIONS since we were not aware of
> any real use case for this other than hwsim testing. They can be supported on
> global control interface without limitation AFAIC.
> 
> In general, it may be fine to add CONFIG_TESTING_OPTIONS blocks in the
> implementation, but that is certainly not the preference and should be left for
> cases where testing cannot be done without the change. In this specific case, I
> don't see why this would need to be handled through
> wpas_global_ctrl_iface_redir_p2p(), i.e., the test script should be capable of
> directing the command to the appropriate interface directly.
> 

Ok. Will change the test case to distinguish between a configurations with/without P2P Device interface.

Thanks,

Ilan.


From yoelda0 at gmail.com  Sun Nov  1 02:50:23 2015
From: yoelda0 at gmail.com (Yoel D.)
Date: Sun, 1 Nov 2015 12:50:23 +0200
Subject: nl80211: delete interface from bridge before removing the
 interface
In-Reply-To: <20151031220042.GI9636@w1.fi>
References: <CAG0=CnWR60xEudXJY5GBXfJNR2m03t4kyZ1-jgVN3K57uLu3Fg@mail.gmail.com>
 <20151031220042.GI9636@w1.fi>
Message-ID: <CAG0=CnXUsUsj91pcLRkx2MyRA8qQdHEJ_A-q6yTuXLS2-cni0Q@mail.gmail.com>

No, I didn't experience any functionality issues.

Nonetheless, after switching the invocation order of the functions
nl80211_remove_iface() and linux_br_del_if() the log entry disappears.
However, I'm unsure whether this patch could prove problematic under a
setup different than mine.


On Sun, Nov 1, 2015 at 12:00 AM, Jouni Malinen <j at w1.fi> wrote:
> On Sat, Oct 10, 2015 at 09:24:30PM +0300, Yoel D. wrote:
>> I've encountered the following error during hostapd shutdown process:
>>
>>     hostapd: nl80211: Failed to remove interface wlan0-1 from bridge
>> br0: No such device
>>
>> I think that this error occurs because the function
>> wpa_driver_nl80211_if_remove() removes the specified interface from
>> the host via the function nl80211_remove_iface() before deleting it
>> from the bridge via the function linux_br_del_if().
>>
>> Thus, when the function linux_br_del_if() is finally invoked in the
>> next few lines of code, the aforementioned error is raised since the
>> interface no longer exists.
>
> Does this cause any real issue to functionality apart from seeing that
> entry in debug log? I'm pretty sure this is not the only case where
> similar debug entries can be seen since the operation is not really
> needed in some cases.
>
> --
> Jouni Malinen                                            PGP id EFC895FA


From ilan.peer at intel.com  Sun Nov  1 06:54:31 2015
From: ilan.peer at intel.com (Peer, Ilan)
Date: Sun, 1 Nov 2015 14:54:31 +0000
Subject: [PATCH 05/14] tests: Change persistent_group_missed_inv_resp()
 test
In-Reply-To: <20151031213459.GE9636@w1.fi>
References: <1444837400-17309-1-git-send-email-ilan.peer@intel.com>
 <1444837400-17309-6-git-send-email-ilan.peer@intel.com>
 <20151016173019.GB23614@w1.fi>
 <CB3B3D4774441E42AA3EA0E1BA8230A04DC14C46@HASMSX110.ger.corp.intel.com>
 <20151031213459.GE9636@w1.fi>
Message-ID: <CB3B3D4774441E42AA3EA0E1BA8230A04DC2A498@HASMSX110.ger.corp.intel.com>

Hi Jouni,

> -----Original Message-----
> From: Jouni Malinen [mailto:j at w1.fi]
> Sent: Saturday, October 31, 2015 23:35
> To: Peer, Ilan
> Cc: hostap at lists.infradead.org; Stern, Avraham
> Subject: Re: [PATCH 05/14] tests: Change
> persistent_group_missed_inv_resp() test
> 
> On Thu, Oct 22, 2015 at 02:09:44PM +0000, Peer, Ilan wrote:
> > > > Support configurations that use a dedicated P2P device interface
> > > > by setting ext_mgmt_frame_handling and waiting for MGMT-RX event
> > > > on the global control interface.
> 
> > Would you prefer to handle this by adding an argument to the mgmt._rx to
> state if this is P2P frame or not and have the method resolve the interface
> name internally based on whether P2P Device is used or not (something
> similar to list_networks()).
> 
> To be honest, I'm not sure I'd want either and I'm not sure I understand the
> need to make this specific test case "work" with the where mac80211_hwsim
> is forced to use a separate P2P Device interface. I would much rather focus
> on making sure there is sufficient coverage for both options in test cases
> without relying to running tests with custom configuration that results in this
> type of issues in the first place. In other words, I'd rather leave this as-is and if
> something is missing from testing coverage with P2P Device interface, that
> should addressed by adding a new test case that adds a dynamic hwsim radio
> with P2P Device interface and then appropriately targeted SET and wait-event
> commands on the interface that handles P2P messages.
> 

We are running the testing framework with support for P2P Device dedicated interface as this is the configuration we are most interested with, so we are trying to modify the framework/tests so they could also be valuable for such configuration. Saying that, I concur with the approach of adding P2P Device interface specific tests when needed, to avoid relying on the custom configurations.

Thanks again,

Ilan.


From j at w1.fi  Sun Nov  1 11:45:18 2015
From: j at w1.fi (Jouni Malinen)
Date: Sun, 1 Nov 2015 21:45:18 +0200
Subject: [PATCH 4/4] wpa_supplicant: Add GTK RSC relaxation workaround
In-Reply-To: <1444814793-21050-4-git-send-email-ilan.peer@intel.com>
References: <1444814793-21050-1-git-send-email-ilan.peer@intel.com>
 <1444814793-21050-4-git-send-email-ilan.peer@intel.com>
Message-ID: <20151101194518.GA18977@w1.fi>

On Wed, Oct 14, 2015 at 12:26:33PM +0300, Ilan Peer wrote:
> Some APs may send RSC octets in EAP message 3 of 4-Way Handshake or in
> EAP message 1 of Group Key Handshake in the opposite order. Thus, after a
> successful EAP authentication the TSC values of received multicast packets,
> such as DHCP, don't match the RSC one and as a result these packets are
> dropped on replay attack TSC verification. An example of such AP is
> Sapido RB-1732.
> 
> Workaournd this by setting RSC octets to 0 on GTK installation if the AP
> RSC value is identified as a potentially having the byte order issue.
> The wpa_rsc_relaxation global configuration property allows to disable
> the GTK RSC workaround if it's not needed.

Thanks, applied with some fixes and cleanup.

> +static int wpa_supplicant_get_wpa_rsc_relaxation(const struct wpa_sm *sm)
> +{
> +	if (sm->ctx->get_wpa_rsc_relaxation)
> +		return sm->ctx->get_wpa_rsc_relaxation(sm->ctx->ctx);
> +	return 0;
> +}

There is no need to add a separate function pointer and callback for
this; there is already a mechanism for updating WPA/RSN configuration
parameters for each connection. I replaced this callback mechanism with
a new such configuration parameter.

> +static int wpa_supplicant_rsc_relaxation(const struct wpa_sm *sm,
> +					 const u8 *rsc)
> +{
> +	int rsclen;
> +
> +	if (wpa_supplicant_get_wpa_rsc_relaxation(sm))
> +		return 0;

This logic looks reversed, i.e., that needs to be "if
(!wpa_supplicant_get_wpa_rsc_relaxation(sm))"..

-- 
Jouni Malinen                                            PGP id EFC895FA


From kuroishi at iij.ad.jp  Sun Nov  1 18:27:21 2015
From: kuroishi at iij.ad.jp (Kuroishi Mitsuo)
Date: Mon, 02 Nov 2015 11:27:21 +0900 (JST)
Subject: without OpenSSL
In-Reply-To: <20151031160327.GA15367@w1.fi>
References: <20151029.101304.858534027462212547.kuroishi@iij.ad.jp>
 <20151031160327.GA15367@w1.fi>
Message-ID: <20151102.112721.1578863479725436400.kuroishi@iij.ad.jp>


  Message-id: <20151031160327.GA15367 at w1.fi>
  From:       Jouni Malinen <j at w1.fi>
  Subject:    Re: without OpenSSL
  Date:       Sat, 31 Oct 2015 18:03:27 +0200

  > On Thu, Oct 29, 2015 at 10:13:04AM +0900, Kuroishi Mitsuo wrote:
  > > Dose anyone work the hostapd without OpenSSL?
  > 
  > Works fine for me.
  > 
  > > I managed to build it however it dosen't work well now.
  > > It seems to have some problem around crypto module maybe and
  > > details below.
  > > 
  > > It works well when it's build with OpenSSL.
  > > 
  > > My hostapd version is 2.4 on NetBSD ARM architecture.
  > > 
  > > I'd appreciate if I were given some helpful advice.
  > 
  > I would need to see more verbose debug log from both hostapd and
  > wpa_supplicant, e.g., with -ddK on the command line. This will include
  > private key material, so make sure to do that only with test passwords
  > that you do not mind exposing publicly.

Thanks for your information.

I'm busy this week so hopefully I'll repot it next week or so.

Regards,

--
Kuroishi Mitsuo


From ilan.peer at intel.com  Sun Nov  1 23:51:15 2015
From: ilan.peer at intel.com (Peer, Ilan)
Date: Mon, 2 Nov 2015 07:51:15 +0000
Subject: [PATCH 4/4] wpa_supplicant: Add GTK RSC relaxation workaround
In-Reply-To: <20151101194518.GA18977@w1.fi>
References: <1444814793-21050-1-git-send-email-ilan.peer@intel.com>
 <1444814793-21050-4-git-send-email-ilan.peer@intel.com>
 <20151101194518.GA18977@w1.fi>
Message-ID: <CB3B3D4774441E42AA3EA0E1BA8230A04DC2C0E9@HASMSX110.ger.corp.intel.com>

> 
> On Wed, Oct 14, 2015 at 12:26:33PM +0300, Ilan Peer wrote:
> > Some APs may send RSC octets in EAP message 3 of 4-Way Handshake or in
> > EAP message 1 of Group Key Handshake in the opposite order. Thus,
> > after a successful EAP authentication the TSC values of received
> > multicast packets, such as DHCP, don't match the RSC one and as a
> > result these packets are dropped on replay attack TSC verification. An
> > example of such AP is Sapido RB-1732.
> >
> > Workaournd this by setting RSC octets to 0 on GTK installation if the
> > AP RSC value is identified as a potentially having the byte order issue.
> > The wpa_rsc_relaxation global configuration property allows to disable
> > the GTK RSC workaround if it's not needed.
> 
> Thanks, applied with some fixes and cleanup.
> 
> > +static int wpa_supplicant_get_wpa_rsc_relaxation(const struct wpa_sm
> > +*sm) {
> > +	if (sm->ctx->get_wpa_rsc_relaxation)
> > +		return sm->ctx->get_wpa_rsc_relaxation(sm->ctx->ctx);
> > +	return 0;
> > +}
> 
> There is no need to add a separate function pointer and callback for this;
> there is already a mechanism for updating WPA/RSN configuration
> parameters for each connection. I replaced this callback mechanism with a
> new such configuration parameter.
> 

I'll remember this in the future.

> > +static int wpa_supplicant_rsc_relaxation(const struct wpa_sm *sm,
> > +					 const u8 *rsc)
> > +{
> > +	int rsclen;
> > +
> > +	if (wpa_supplicant_get_wpa_rsc_relaxation(sm))
> > +		return 0;
> 
> This logic looks reversed, i.e., that needs to be "if
> (!wpa_supplicant_get_wpa_rsc_relaxation(sm))"..
> 

Yep. Thanks for catching this.

Thanks,

Ilan.



From Thomas.Stather at mpimf-heidelberg.mpg.de  Mon Nov  2 01:19:19 2015
From: Thomas.Stather at mpimf-heidelberg.mpg.de (Thomas Stather)
Date: Mon, 02 Nov 2015 10:19:19 +0100
Subject: problem compiling eapol_test under OpenSuse 13.2
In-Reply-To: <20151031163310.GD25567@w1.fi>
References: <5632006F.8050102@mpimf-heidelberg.mpg.de>
 <20151031163310.GD25567@w1.fi>
Message-ID: <56372A97.6090208@mpimf-heidelberg.mpg.de>

Thanks a lot this helped and i was able to compile eapol_test without 
the failing depencies.

Best,
Thomas

Am 31.10.2015 um 17:33 schrieb Jouni Malinen:
> On Thu, Oct 29, 2015 at 12:18:07PM +0100, Thomas Stather wrote:
>> I wanted to compile the eapol_test binary to test my eap setup
>> (Eduroam service, EAP-PEAP/MSCHAPv2 and EAP-TTLS/MSCHAPv2).
>>
>> The VM is using OpenSuse 13.2
>>
>> The manual is here:
>> http://deployingradius.com/scripts/eapol_test/
> Those instructions use wpa_supplicant/defconfig more or less as-is as
> the build configuration which is not really ideal for the case where
> only eapol_test is built. This leaves some unneeded build parameters
> like various driver interfaces enabled. That is not really needed for
> eapol_test and it would be easier to simply disable those.
>
>> However when i do a "make eapol_test" i get:
>> ...
>>     CC  ../src/utils/ip_addr.c
>> /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld:
>> cannot find -lnl
>> The response from the freeradius-users list was that i need the "libnl" package so i installed these:
>>
>> libnl3-200
>> libnl3-devel
>> libnl3-200-32bit
> For libnl version 3 to work, you would need to uncomment
> CONFIG_LIBNL32=y in wpa_supplicant/.config. That said, it will be
> simpler to just comment out (or just delete the lines)
> CONFIG_DRIVER_WEXT=y and CONFIG_DRIVER_NL80211=y in
> wpa_supplicant/.config when building only eapol_test and not
> wpa_supplicant. That will remove dependency on libnl completely.
>

-- 
Thomas Stather
IT Services

Tel:  +49 6221-486 628
Fax: +49 6221-486 561

------------------------------------------------------------------------
Max Planck Institute for Medical Research (MPImF)
Jahnstrasse 29, 69120 Heidelberg
Germany



From sazzalin at settopsurvey.com  Mon Nov  2 04:25:05 2015
From: sazzalin at settopsurvey.com (simo)
Date: Mon, 2 Nov 2015 13:25:05 +0100
Subject: Encryption problems with nl80211
In-Reply-To: <1446142821.24967.46.camel@s-altop>
References: <1445966180.4475.16.camel@s-altop>
 <1445971319.24757.13.camel@redhat.com>
 <CABPxzYJHd+4KG3dLQxGAMuo_pz-45ie5ro338DKuZ2RPGGRpuQ@mail.gmail.com>
 <1445976308.24757.14.camel@redhat.com> <1446044529.4368.3.camel@redhat.com>
 <CABPxzYKFLs6vR=2aJ=8XsnqFpU3jDU6b1LF8MjkNvnRyRQdGzA@mail.gmail.com>
 <1446047396.24967.9.camel@s-altop> <1446048055.4368.19.camel@redhat.com>
 <1446049524.24967.26.camel@s-altop> <1446051824.4368.20.camel@redhat.com>
 <1446052889.24967.32.camel@s-altop> <1446055031.4368.36.camel@redhat.com>
 <1446142821.24967.46.camel@s-altop>
Message-ID: <1446467105.24967.67.camel@s-altop>

I finally recompiled the kernel with the option

CONFIG_CFG80211_WEXT=y


This casues me to replace the lib80211,cgf80211,libertas & libertas_sdio
drivers. To be sure I also replaced the rfkill* drivers.
iwconfig now can detect wlan0, which is normal I think..

Most of the ioctl error messages are disappeared (just one is shown..):

ioctl[SIOCSIWPMKSA]: Invalid argument

And I don't understand what this error refers to..
The network is shown as before, unencrypted.

I post the output of the wpa_execution from shell:

$ wpa_supplicant -D wext -i wlan0
-c /etc/wpa_supplicant/wpa_supplicant.conf.ibss-wep -dd
wpa_supplicant v2.3
random: Trying to read entropy from /dev/random
Successfully initialized wpa_supplicant
Initializing interface 'wlan0' conf
'/etc/wpa_supplicant/wpa_supplicant.conf.ibss-wep' driver 'wext'
ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant/wpa_supplicant.conf.ibss-wep' ->
'/etc/wpa_supplicant/wpa_supplicant.conf.ibss-wep'
Reading configuration file
'/etc/wpa_supplicant/wpa_supplicant.conf.ibss-wep'
ap_scan=1
ctrl_interface='/var/run/wpa_supplicant'
Line: 3 - start of a new network block
ssid - hexdump_ascii(len=10):
     6d 79 2d 6e 65 74 2d 33 30 32                     my-net-302      
mode=1 (0x1)
frequency=2412 (0x96c)
priority=5 (0x5)
key_mgmt: 0x4
Priority group 5
   id=0 ssid='my-net-302'
WEXT: cfg80211-based driver detected
wext: interface wlan0 phy: phy0
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=2 op=0 soft=0 hard=0
ioctl[SIOCSIWPMKSA]: Invalid argument
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
  capabilities: key_mgmt 0xf enc 0x1f flags 0x0
netlink: Operstate: ifindex=3 linkmode=1 (userspace-control),
operstate=5 (IF_OPER_DORMANT)
Add interface wlan0 to a new radio phy0
wlan0: Own MAC address: 00:19:88:4d:53:ae
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_countermeasures
wlan0: RSN: flushing PMKID list in the driver
wlan0: Setting scan request: 0.100000 sec
wlan0: WPS: UUID based on MAC address:
39cee858-d55e-5e3d-b589-30e2c9d32960
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
wlan0: Added interface wlan0
wlan0: State: DISCONNECTED -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5
(IF_OPER_DORMANT)
random: Got 20/20 bytes from /dev/random
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared - ignore event
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared - ignore event
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared - ignore event
Wireless event: cmd=0x8b06 len=8
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared - ignore event
Wireless event: cmd=0x8b1a len=8
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared - ignore event
wlan0: State: DISCONNECTED -> SCANNING
wlan0: Starting AP scan for wildcard SSID
wlan0: Add radio work 'scan'@0xfa458
wlan0: First radio work item in the queue - schedule start immediately
wlan0: Starting radio work 'scan'@0xfa458 after 0.000122 second wait
Scan requested (ret=0) - scan timeout 10 seconds
EAPOL: disable timer tick
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared - ignore event
Wireless event: cmd=0x8b19 len=8
wlan0: Event SCAN_RESULTS (3) received
Received 301 bytes of scan results (1 BSSes)
wlan0: BSS: Start scan result update 1
wlan0: BSS: Add new id 0 BSSID 02:24:74:76:43:bc SSID 'my-network-302'
BSS: last_scan_res_used=1/32
wlan0: New scan results available (own=0 ext=0)
wlan0: Radio work 'scan'@0xfa458 done in 1.097369 seconds
wlan0: Selecting BSS from priority group 5
wlan0: 0: 02:24:74:76:43:bc ssid='my-network-302' wpa_ie_len=0
rsn_ie_len=0 caps=0x2 level=0
wlan0:    skip - SSID mismatch
wlan0: No suitable network found
wlan0: Setup a new network
wlan0: Add radio work 'connect'@0xfa458
wlan0: First radio work item in the queue - schedule start immediately
wlan0: Starting radio work 'connect'@0xfa458 after 0.000153 second wait
wlan0: Trying to associate with SSID 'my-net-302'
wlan0: Cancelling scan request
wlan0: WPA: clearing own WPA/RSN IE
wlan0: Automatic auth_alg selection: 0x1
wlan0: WPA: clearing AP WPA IE
wlan0: WPA: clearing AP RSN IE
wlan0: WPA: clearing own WPA/RSN IE
wlan0: State: SCANNING -> ASSOCIATING
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5
(IF_OPER_DORMANT)
wpa_driver_wext_associate
wpa_driver_wext_set_drop_unencrypted
ioctl[SIOCSIWGENIE]: Operation not supported
wpa_driver_wext_set_psk
wlan0: Association request to the driver failed
wlan0: Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=ForceAuthorized
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared - ignore event
Wireless event: cmd=0x8b1a len=8
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared - ignore event
Wireless event: cmd=0x8b06 len=8
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared - ignore event
Wireless event: cmd=0x8b04 len=12
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared - ignore event
Wireless event: cmd=0x8b1a len=18
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared - ignore event
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 02:2f:af:53:8c:98
wlan0: Event ASSOC (0) received
wlan0: State: ASSOCIATING -> ASSOCIATED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5
(IF_OPER_DORMANT)
wlan0: Associated to a new BSS: BSSID=02:2f:af:53:8c:98
Received 592 bytes of scan results (2 BSSes)
wlan0: BSS: Start scan result update 2
wlan0: BSS: Add new id 1 BSSID 02:2f:af:53:8c:98 SSID 'my-net-302'
wlan0: Associated with 02:2f:af:53:8c:98
wlan0: WPA: Association event - clear replay counter
wlan0: WPA: Clear old PTK
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - portEnabled=1
EAPOL: SUPP_PAE entering state S_FORCE_AUTH
EAPOL: Supplicant port status: Authorized
EAPOL: SUPP_BE entering state IDLE
wlan0: Cancelling authentication timeout
wlan0: State: ASSOCIATED -> COMPLETED
wlan0: Radio work 'connect'@0xfa458 done in 0.180606 seconds
wlan0: CTRL-EVENT-CONNECTED - Connection to 02:2f:af:53:8c:98 completed
[id=0 id_str=]
wpa_driver_wext_set_operstate: operstate 0->1 (UP)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=6
(IF_OPER_UP)
wlan0: Cancelling scan request
RTM_NEWLINK: operstate=1 ifi_flags=0x11003 ([UP][LOWER_UP])
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=6
(IF_OPER_UP)
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared - ignore event
RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared - ignore event


Could the problem come from another driver?

Regards,
Simon
 

On Thu, 2015-10-29 at 19:20 +0100, simo wrote:
> OK Dan,
> 
> Thank you for the useful infos and for the help.
> 
> PS: I am recompiling the kernel with the config for wext enable.
> I will let you know.
> 
> Again, thank you.
> Regards
> 
> Simon
> 
> 
> 
> On Wed, 2015-10-28 at 12:57 -0500, Dan Williams wrote:
> > On Wed, 2015-10-28 at 18:21 +0100, simo wrote:
> > > On Wed, 2015-10-28 at 12:03 -0500, Dan Williams wrote:
> > > > Hmm, I'll bet your kernel has CFG80211_WEXT_EXPORT disabled...  
> > > 
> > > Yes, you're right. The kernel is configured from yocto and I did not
> > > look for this option. I will enable it and I will recompile the kernel.
> > > 
> > > I will update this thread with the results as soon as possible.
> > > 
> > > 
> > > > so with that in mind, the best option is to just get cfg80211 fixed to allow WEP
> > > > keys during create/join for IBSS.
> > > I am sorry Dan, but I don't understand what you mean with "get cfg80211
> > > fixed".
> > 
> > The problem is that the kernel's cfg80211/nl80211 API (which libertas
> > uses for WEXT API emulation) does not allow sending the WEP key during
> > the IBSS join.  But Libertas requires that.  There's no particular
> > reason cfg80211 should have this restriction.
> > 
> > Dan
> > 
> 
> 
> 
> _______________________________________________
> Hostap mailing list
> Hostap at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/hostap




From chaitanya.mgit at gmail.com  Mon Nov  2 07:04:42 2015
From: chaitanya.mgit at gmail.com (Chaitanya T K)
Date: Mon,  2 Nov 2015 20:34:42 +0530
Subject: [PATCH] offchannel: Cancel the pending_action TX wait,
 before starting new one.
Message-ID: <1446476682-23007-1-git-send-email-chaitanya.mgit@gmail.com>

From: tkc <chaitanya.mgit at gmail.com>

From: Chaitanya T K <chaitanya.mgit at gmail.com>

Before the tx_status is received for the action frame, if we
get another request, we respond to that by freeing the memory
for pending_action_tx, but we don't cancel the TX wait, so
in the kernel the ROC will not be cancelled.

Due to above issue, wpa_supplicant assumes that all pending
RoC's are cancelled and proceeds with interface creation and
connection, where as state in mac80211/driver will be roc_in_progress.

This is leading to issues at driver level.

Signed-off-by: Chaitanya T K <chaitanya.mgit at gmail.com>
---
 wpa_supplicant/offchannel.c |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/wpa_supplicant/offchannel.c b/wpa_supplicant/offchannel.c
index 6b3f83c..bd2f905 100644
--- a/wpa_supplicant/offchannel.c
+++ b/wpa_supplicant/offchannel.c
@@ -254,13 +254,7 @@ int offchannel_send_action(struct wpa_supplicant *wpa_s, unsigned int freq,
 	wpa_s->pending_action_tx_status_cb = tx_cb;
 
 	if (wpa_s->pending_action_tx) {
-		wpa_printf(MSG_DEBUG, "Off-channel: Dropped pending Action "
-			   "frame TX to " MACSTR " (pending_action_tx=%p)",
-			   MAC2STR(wpa_s->pending_action_dst),
-			   wpa_s->pending_action_tx);
-		wpa_hexdump_buf(MSG_MSGDUMP, "Pending TX frame",
-				wpa_s->pending_action_tx);
-		wpabuf_free(wpa_s->pending_action_tx);
+		offchannel_send_action_done(wpa_s);
 	}
 	wpa_s->pending_action_tx_done = 0;
 	wpa_s->pending_action_tx = wpabuf_alloc(len);
-- 
1.7.9.5



From chaitanya.mgit at gmail.com  Mon Nov  2 07:10:28 2015
From: chaitanya.mgit at gmail.com (Chaitanya T K)
Date: Mon,  2 Nov 2015 20:40:28 +0530
Subject: [PATCHv2] offchannel: Cancel the pending_action TX wait,
 before starting new one.
Message-ID: <1446477028-23118-1-git-send-email-chaitanya.mgit@gmail.com>

From: tkc <chaitanya.mgit at gmail.com>

Before the tx_status is received for the action frame, if we
get another request, we respond to that by freeing the memory
for pending_action_tx, but we don't cancel the TX wait, so
in the kernel the ROC will not be cancelled.

Due to above issue, wpa_supplicant assumes that all pending
RoC's are cancelled and proceeds with interface creation and
connection, where as state in mac80211/driver will be roc_in_progress.

This is leading to issues at driver level.

Signed-off-by: Chaitanya T K <chaitanya.mgit at gmail.com>
---
V2: Fix 2 from's.
    Remove the unnecessary braces.
---
 wpa_supplicant/offchannel.c |   12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/wpa_supplicant/offchannel.c b/wpa_supplicant/offchannel.c
index 6b3f83c..581c5f6 100644
--- a/wpa_supplicant/offchannel.c
+++ b/wpa_supplicant/offchannel.c
@@ -253,15 +253,9 @@ int offchannel_send_action(struct wpa_supplicant *wpa_s, unsigned int freq,
 
 	wpa_s->pending_action_tx_status_cb = tx_cb;
 
-	if (wpa_s->pending_action_tx) {
-		wpa_printf(MSG_DEBUG, "Off-channel: Dropped pending Action "
-			   "frame TX to " MACSTR " (pending_action_tx=%p)",
-			   MAC2STR(wpa_s->pending_action_dst),
-			   wpa_s->pending_action_tx);
-		wpa_hexdump_buf(MSG_MSGDUMP, "Pending TX frame",
-				wpa_s->pending_action_tx);
-		wpabuf_free(wpa_s->pending_action_tx);
-	}
+	if (wpa_s->pending_action_tx)
+		offchannel_send_action_done(wpa_s);
+
 	wpa_s->pending_action_tx_done = 0;
 	wpa_s->pending_action_tx = wpabuf_alloc(len);
 	if (wpa_s->pending_action_tx == NULL) {
-- 
1.7.9.5



From p.kushwaha at samsung.com  Mon Nov  2 23:01:27 2015
From: p.kushwaha at samsung.com (Purushottam Kushwaha)
Date: Tue, 03 Nov 2015 07:01:27 +0000 (GMT)
Subject: [PATCH] [DBus]: Add SaveConfig to update configuration file
Message-ID: <463125029.430151446534087858.JavaMail.weblogic@ep2mlwas05a>

This is similar to save_config on control interface,
which allow users to update configuration file.

Signed-off-by: Purushottam Kushwaha <p.kushwaha at samsung.com>
Signed-off-by: Mayank Haarit <mayank.h at samsung.com>
---
 wpa_supplicant/dbus/dbus_new.c          |  8 ++++++++
 wpa_supplicant/dbus/dbus_new_handlers.c | 27 +++++++++++++++++++++++++++
 wpa_supplicant/dbus/dbus_new_handlers.h |  3 +++
 3 files changed, 38 insertions(+)

diff --git a/wpa_supplicant/dbus/dbus_new.c b/wpa_supplicant/dbus/dbus_new.c
index 16bada9..1bbfe49 100644
--- a/wpa_supplicant/dbus/dbus_new.c
+++ b/wpa_supplicant/dbus/dbus_new.c
@@ -3069,6 +3069,14 @@ static const struct wpa_dbus_method_desc wpas_dbus_interface_methods[] = {
 	  }
 	},
 #endif /* CONFIG_TDLS */
+#ifndef CONFIG_NO_CONFIG_WRITE
+	{ "SaveConfig", WPAS_DBUS_NEW_IFACE_INTERFACE,
+	  (WPADBusMethodHandler) wpas_dbus_handler_save_config,
+	  {
+		  END_ARGS
+	  }
+	},
+#endif /* CONFIG_NO_CONFIG_WRITE */
 	{ NULL, NULL, NULL, { END_ARGS } }
 };
 
diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c
index a963e85..4a4c623 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers.c
@@ -2294,6 +2294,33 @@ DBusMessage * wpas_dbus_handler_tdls_teardown(DBusMessage *message,
 #endif /* CONFIG_TDLS */
 
 
+#ifndef CONFIG_NO_CONFIG_WRITE
+/**
+ * wpas_dbus_handler_save_config - Save Configuration to conf file
+ * @message: Pointer to incoming dbus message
+ * @wpa_s: wpa_supplicant structure for a network interface
+ * Returns: NULL on Success, Otherwise errror message
+ *
+ * Handler function for "SaveConfig" method call of network interface.
+ */
+DBusMessage * wpas_dbus_handler_save_config(DBusMessage *message,
+					    struct wpa_supplicant *wpa_s)
+{
+	int ret;
+	if (!wpa_s->conf->update_config) {
+		return wpas_dbus_error_unknown_error(message,
+			"Not allowed to update configuration (update_config=0)");
+	}
+
+	ret = wpa_config_write(wpa_s->confname, wpa_s->conf);
+	if (ret)
+		return wpas_dbus_error_unknown_error(message,
+			"Failed to update configuration");
+	return NULL;
+}
+#endif /* CONFIG_NO_CONFIG_WRITE */
+
+
 /**
  * wpas_dbus_handler_set_pkcs11_engine_and_module_path - Set PKCS #11 engine and module path
  * @message: Pointer to incoming dbus message
diff --git a/wpa_supplicant/dbus/dbus_new_handlers.h b/wpa_supplicant/dbus/dbus_new_handlers.h
index 1e9b1732..86c8359 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers.h
+++ b/wpa_supplicant/dbus/dbus_new_handlers.h
@@ -194,6 +194,9 @@ DBusMessage * wpas_dbus_handler_tdls_status(DBusMessage *message,
 DBusMessage * wpas_dbus_handler_tdls_teardown(DBusMessage *message,
 					      struct wpa_supplicant *wpa_s);
 
+DBusMessage * wpas_dbus_handler_save_config(DBusMessage *message,
+					    struct wpa_supplicant *wpa_s);
+
 DBusMessage * wpas_dbus_error_invalid_args(DBusMessage *message,
 					   const char *arg);
 DBusMessage * wpas_dbus_error_unknown_error(DBusMessage *message,
-- 
1.9.1


From p.kushwaha at samsung.com  Mon Nov  2 23:03:58 2015
From: p.kushwaha at samsung.com (Purushottam Kushwaha)
Date: Tue, 03 Nov 2015 07:03:58 +0000 (GMT)
Subject: [PATCH] Copy Paste error in debug print
Message-ID: <409294535.430481446534238577.JavaMail.weblogic@ep2mlwas05a>

Signed-off-by: Mayank Haarit <mayank.h at samsung.com>
---
 wpa_supplicant/dbus/dbus_new_handlers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c
index 4a4c623..d140dbd 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers.c
@@ -1877,7 +1877,7 @@ out:
 	os_free(iface);
 	return reply;
 #else /* IEEE8021X_EAPOL */
-	wpa_printf(MSG_DEBUG, "CTRL_IFACE: 802.1X not included");
+	wpa_printf(MSG_DEBUG, "dbus: 802.1X not included");
 	return wpas_dbus_error_unknown_error(message, "802.1X not included");
 #endif /* IEEE8021X_EAPOL */
 }
-- 
1.9.1

From p.kushwaha at samsung.com  Mon Nov  2 23:06:55 2015
From: p.kushwaha at samsung.com (Purushottam Kushwaha)
Date: Tue, 03 Nov 2015 07:06:55 +0000 (GMT)
Subject: [PATCH] Typo in debug message
Message-ID: <584674899.430781446534415537.JavaMail.weblogic@ep2mlwas05a>

Signed-off-by: Dilshad Ahmad <dilshad.a at samsung.com>
---
 src/p2p/p2p_invitation.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/p2p/p2p_invitation.c b/src/p2p/p2p_invitation.c
index 108e5b7..70da15a 100644
--- a/src/p2p/p2p_invitation.c
+++ b/src/p2p/p2p_invitation.c
@@ -284,7 +284,7 @@ void p2p_process_invitation_req(struct p2p_data *p2p, const u8 *sa,
 
 		if (!p2p_channels_includes(&intersection, reg_class, channel))
 		{
-			p2p_dbg(p2p, "forced freq %d MHz not in the supported channels interaction",
+			p2p_dbg(p2p, "forced freq %d MHz not in the supported channels intersection",
 				op_freq);
 			status = P2P_SC_FAIL_NO_COMMON_CHANNELS;
 			goto fail;
-- 
1.9.1

From som6000 at gmail.com  Tue Nov  3 02:19:41 2015
From: som6000 at gmail.com (Somdas Bandyopadhyay)
Date: Tue, 3 Nov 2015 15:49:41 +0530
Subject: [PATCH] Support for launching Chrome browser(if present) from HS20
 client
Message-ID: <CAG8jGXM67FYagtf8Rz2GKLbL1ik4oem7w6Azex-7BeCcrpkouw@mail.gmail.com>

PFA the patch file.

If Chrome browser is present in the device then launch Chrome browser.
Else launch the normal native browser (original flow). PFA the patch
file.

Currently in hs20_web_browser function, native/stock Android browser
is launched. But currently most of the phones do not have native
Android present now. Android now recommends using Chrome browser.
Added the support for launching Chrome browser. First check whether
chrome browser if present. If it is present then launch chrome browser
as it is the recommended browser to use. If chrome browser is not
present in the device, then launch the native Android browser.


-- 
Thanks and regards,
Somdas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Added-support-for-launching-Chrome-Browser-if-presen.patch
Type: application/octet-stream
Size: 2113 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/hostap/attachments/20151103/5fe1ffd2/attachment.obj>

From johannes at sipsolutions.net  Tue Nov  3 02:34:51 2015
From: johannes at sipsolutions.net (Johannes Berg)
Date: Tue, 03 Nov 2015 11:34:51 +0100
Subject: [PATCH] Support for launching Chrome browser(if present) from
 HS20 client
In-Reply-To: <CAG8jGXM67FYagtf8Rz2GKLbL1ik4oem7w6Azex-7BeCcrpkouw@mail.gmail.com>
References: <CAG8jGXM67FYagtf8Rz2GKLbL1ik4oem7w6Azex-7BeCcrpkouw@mail.gmail.com>
Message-ID: <1446546891.29010.15.camel@sipsolutions.net>

On Tue, 2015-11-03 at 15:49 +0530, Somdas Bandyopadhyay wrote:
> PFA the patch file.
> 
> If Chrome browser is present in the device then launch Chrome 
> browser.
> Else launch the normal native browser (original flow). PFA the patch
> file.
> 
That seems really odd - wouldn't you use the intents framework to
launch the user's default browser?

johannes


From johannes at sipsolutions.net  Tue Nov  3 02:49:44 2015
From: johannes at sipsolutions.net (Johannes Berg)
Date: Tue, 03 Nov 2015 11:49:44 +0100
Subject: [PATCH] Support for launching Chrome browser(if present) from
 HS20 client
In-Reply-To: <1446546891.29010.15.camel@sipsolutions.net>
References: <CAG8jGXM67FYagtf8Rz2GKLbL1ik4oem7w6Azex-7BeCcrpkouw@mail.gmail.com>
 <1446546891.29010.15.camel@sipsolutions.net>
Message-ID: <1446547784.29010.16.camel@sipsolutions.net>

On Tue, 2015-11-03 at 11:34 +0100, Johannes Berg wrote:
> On Tue, 2015-11-03 at 15:49 +0530, Somdas Bandyopadhyay wrote:
> > PFA the patch file.
> > 
> > If Chrome browser is present in the device then launch Chrome 
> > browser.
> > Else launch the normal native browser (original flow). PFA the 
> > patch
> > file.
> > 
> That seems really odd - wouldn't you use the intents framework to
> launch the user's default browser?
> 

It looks like perhaps you can use

/system/bin/am start -a android.intent.action.VIEW [...]

somehow?

johannes


From som6000 at gmail.com  Tue Nov  3 02:50:29 2015
From: som6000 at gmail.com (Somdas Bandyopadhyay)
Date: Tue, 3 Nov 2015 16:20:29 +0530
Subject: [PATCH] Support for launching Chrome browser(if present) from
 HS20 client
In-Reply-To: <1446546891.29010.15.camel@sipsolutions.net>
References: <CAG8jGXM67FYagtf8Rz2GKLbL1ik4oem7w6Azex-7BeCcrpkouw@mail.gmail.com>
 <1446546891.29010.15.camel@sipsolutions.net>
Message-ID: <CAG8jGXPTnTpYb_cL6XfBXFEvTqo8dFw5iCGOb+8q+AbHi_15DA@mail.gmail.com>

Yes, that is also an option (to do that we have to remove the -n
argument in the am command). But that will pop out a dialog for the
user to select the preferred browser. From an UX perspective that
might not be good, as all of a sudden the user will get an pop up to
select a browser. Currently the code always launches the Android
Native browser.  I added the support to launch chrome browser if it is
present. Else it continues with the normal flow of launching native
browser. I feel that's a better option.



On Tue, Nov 3, 2015 at 4:04 PM, Johannes Berg <johannes at sipsolutions.net> wrote:
> On Tue, 2015-11-03 at 15:49 +0530, Somdas Bandyopadhyay wrote:
>> PFA the patch file.
>>
>> If Chrome browser is present in the device then launch Chrome
>> browser.
>> Else launch the normal native browser (original flow). PFA the patch
>> file.
>>
> That seems really odd - wouldn't you use the intents framework to
> launch the user's default browser?
>
> johannes



-- 
Thanks and regards,
Somdas


From som6000 at gmail.com  Tue Nov  3 02:54:03 2015
From: som6000 at gmail.com (Somdas Bandyopadhyay)
Date: Tue, 3 Nov 2015 16:24:03 +0530
Subject: [PATCH] Support for launching Chrome browser(if present) from
 HS20 client
In-Reply-To: <CAG8jGXPTnTpYb_cL6XfBXFEvTqo8dFw5iCGOb+8q+AbHi_15DA@mail.gmail.com>
References: <CAG8jGXM67FYagtf8Rz2GKLbL1ik4oem7w6Azex-7BeCcrpkouw@mail.gmail.com>
 <1446546891.29010.15.camel@sipsolutions.net>
 <CAG8jGXPTnTpYb_cL6XfBXFEvTqo8dFw5iCGOb+8q+AbHi_15DA@mail.gmail.com>
Message-ID: <CAG8jGXPM13O0qsF5_74TUeFAtnGc6XDHvJBsZFo3-3VpqTepuA@mail.gmail.com>

HI Johannes,

The code already uses /system/bin/am start -a
android.intent.action.VIEW [...] .. as suggested by you. Not
specifying the -n argument will give the option to the user to select
the browser. But it pops out a dialog for the user to select the
browser, which is an extra step and might irritate the user also.

On Tue, Nov 3, 2015 at 4:20 PM, Somdas Bandyopadhyay <som6000 at gmail.com> wrote:
> Yes, that is also an option (to do that we have to remove the -n
> argument in the am command). But that will pop out a dialog for the
> user to select the preferred browser. From an UX perspective that
> might not be good, as all of a sudden the user will get an pop up to
> select a browser. Currently the code always launches the Android
> Native browser.  I added the support to launch chrome browser if it is
> present. Else it continues with the normal flow of launching native
> browser. I feel that's a better option.
>
>
>
> On Tue, Nov 3, 2015 at 4:04 PM, Johannes Berg <johannes at sipsolutions.net> wrote:
>> On Tue, 2015-11-03 at 15:49 +0530, Somdas Bandyopadhyay wrote:
>>> PFA the patch file.
>>>
>>> If Chrome browser is present in the device then launch Chrome
>>> browser.
>>> Else launch the normal native browser (original flow). PFA the patch
>>> file.
>>>
>> That seems really odd - wouldn't you use the intents framework to
>> launch the user's default browser?
>>
>> johannes
>
>
>
> --
> Thanks and regards,
> Somdas



-- 
Thanks and regards,
Somdas


From johannes at sipsolutions.net  Tue Nov  3 03:14:39 2015
From: johannes at sipsolutions.net (Johannes Berg)
Date: Tue, 03 Nov 2015 12:14:39 +0100
Subject: [PATCH] Support for launching Chrome browser(if present) from
 HS20 client
In-Reply-To: <CAG8jGXPM13O0qsF5_74TUeFAtnGc6XDHvJBsZFo3-3VpqTepuA@mail.gmail.com>
 (sfid-20151103_115404_914279_A89451B4)
References: <CAG8jGXM67FYagtf8Rz2GKLbL1ik4oem7w6Azex-7BeCcrpkouw@mail.gmail.com>
 <1446546891.29010.15.camel@sipsolutions.net>
 <CAG8jGXPTnTpYb_cL6XfBXFEvTqo8dFw5iCGOb+8q+AbHi_15DA@mail.gmail.com>
 <CAG8jGXPM13O0qsF5_74TUeFAtnGc6XDHvJBsZFo3-3VpqTepuA@mail.gmail.com>
 (sfid-20151103_115404_914279_A89451B4)
Message-ID: <1446549279.29010.17.camel@sipsolutions.net>

On Tue, 2015-11-03 at 16:24 +0530, Somdas Bandyopadhyay wrote:
> HI Johannes,
> 
> The code already uses /system/bin/am start -a
> android.intent.action.VIEW [...] .. as suggested by you. Not
> specifying the -n argument will give the option to the user to select
> the browser. But it pops out a dialog for the user to select the
> browser, which is an extra step and might irritate the user also.
> 

Fair enough. Does it *always* do that extra step though? I thought it
remembered the choice - is that dependent on the caller, so for every
new caller it would ask again?

Anyway, it's all Jouni's decision in the end :)

johannes


From ilan.peer at intel.com  Tue Nov  3 06:24:56 2015
From: ilan.peer at intel.com (Ilan Peer)
Date: Tue,  3 Nov 2015 16:24:56 +0200
Subject: [PATCH 1/6] wpa_supplicant: Clear ignore_next_local_deauth and
 ignore_deauth_event
In-Reply-To: <1446560701-30841-1-git-send-email-ilan.peer@intel.com>
References: <1446560701-30841-1-git-send-email-ilan.peer@intel.com>
Message-ID: <1446560701-30841-2-git-send-email-ilan.peer@intel.com>

From: Sara Sharon <sara.sharon at intel.com>

The authentication flow in wpa_driver_nl80211_authenticate() can
result in a locally generated de-authentication, in which both
next_local_deauth and ignore_next_local_deauth are set.

However, in mlme_event_deauth_disassoc(), when ignore_deauth_event is
set, the flag is cleared, but the flow immediately returns leaving
ignore_next_local_deauth set, which can result in ignoring future deauth
event from the driver, leaving the wpa_supplicant in an inconsistent
state.

Fix this by clearing both flags in case that next_local_deauth is set.

Signed-off-by: Sara Sharon <sara.sharon at intel.com>
---
 src/drivers/driver_nl80211_event.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c
index 721b1b9..cfede2a 100644
--- a/src/drivers/driver_nl80211_event.c
+++ b/src/drivers/driver_nl80211_event.c
@@ -679,13 +679,15 @@ static void mlme_event_deauth_disassoc(struct wpa_driver_nl80211_data *drv,
 				mgmt->u.disassoc.variable;
 		}
 	} else {
+		event.deauth_info.locally_generated =
+			!os_memcmp(mgmt->sa, drv->first_bss->addr, ETH_ALEN);
 		if (drv->ignore_deauth_event) {
 			wpa_printf(MSG_DEBUG, "nl80211: Ignore deauth event due to previous forced deauth-during-auth");
 			drv->ignore_deauth_event = 0;
+			if (event.deauth_info.locally_generated)
+				drv->ignore_next_local_deauth = 0;
 			return;
 		}
-		event.deauth_info.locally_generated =
-			!os_memcmp(mgmt->sa, drv->first_bss->addr, ETH_ALEN);
 		if (drv->ignore_next_local_deauth) {
 			drv->ignore_next_local_deauth = 0;
 			if (event.deauth_info.locally_generated) {
-- 
1.9.1



From ilan.peer at intel.com  Tue Nov  3 06:24:55 2015
From: ilan.peer at intel.com (Ilan Peer)
Date: Tue,  3 Nov 2015 16:24:55 +0200
Subject: [PATCH 0/6] Few bug fixes
Message-ID: <1446560701-30841-1-git-send-email-ilan.peer@intel.com>

Alexander Bondar (1):
  AP: Avoid 20/40 MHz co-ex scan if PRI/SEC switch is not allowed

Avraham Stern (1):
  wpa_supplicant: Clear send action work without waiting

Ayala Beker (1):
  wpa_supplicant: Clear ignore_next_local_deauth flag

Ilan Peer (2):
  P2P: Set p2p_go_wait_client in invitation_result() cb
  tests: Test no P2P GO move when invitation is in progress

Sara Sharon (1):
  wpa_supplicant: Clear ignore_next_local_deauth and ignore_deauth_event

 src/ap/hw_features.c               |  5 +--
 src/drivers/driver_nl80211_event.c | 23 +++++++++++---
 tests/hwsim/test_p2p_channel.py    | 64 ++++++++++++++++++++++++++++++++++++++
 wpa_supplicant/p2p_supplicant.c    | 11 +++++--
 4 files changed, 94 insertions(+), 9 deletions(-)

-- 
1.9.1



From ilan.peer at intel.com  Tue Nov  3 06:24:58 2015
From: ilan.peer at intel.com (Ilan Peer)
Date: Tue,  3 Nov 2015 16:24:58 +0200
Subject: [PATCH 3/6] P2P: Set p2p_go_wait_client in invitation_result() cb
In-Reply-To: <1446560701-30841-1-git-send-email-ilan.peer@intel.com>
References: <1446560701-30841-1-git-send-email-ilan.peer@intel.com>
Message-ID: <1446560701-30841-4-git-send-email-ilan.peer@intel.com>

When an invitation to join an existing group is accepted by the
peer device, set p2p_go_wait_client to the current time so
that wpas_p2p_in_progress() would return != 0, thus preventing
P2P CSA, scanning etc., that would interfere with the peer
device connection.

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
 wpa_supplicant/p2p_supplicant.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 7d78623..59ca368 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -3101,7 +3101,13 @@ static void wpas_invitation_result(void *ctx, int status, const u8 *bssid,
 	if (wpa_s->pending_invite_ssid_id == -1) {
 		if (status == P2P_SC_FAIL_UNKNOWN_GROUP)
 			wpas_remove_persistent_client(wpa_s, peer);
-		return; /* Invitation to active group */
+
+		/*
+		 * Invitation to active group. Set the client wait, to allow
+		 * provisioning and connection.
+		 */
+		os_get_reltime(&wpa_s->global->p2p_go_wait_client);
+		return;
 	}
 
 	if (status == P2P_SC_FAIL_INFO_CURRENTLY_UNAVAILABLE) {
-- 
1.9.1



From ilan.peer at intel.com  Tue Nov  3 06:24:57 2015
From: ilan.peer at intel.com (Ilan Peer)
Date: Tue,  3 Nov 2015 16:24:57 +0200
Subject: [PATCH 2/6] wpa_supplicant: Clear ignore_next_local_deauth flag
In-Reply-To: <1446560701-30841-1-git-send-email-ilan.peer@intel.com>
References: <1446560701-30841-1-git-send-email-ilan.peer@intel.com>
Message-ID: <1446560701-30841-3-git-send-email-ilan.peer@intel.com>

From: Ayala Beker <ayala.beker at intel.com>

The de-authentication flow in wpa_driver_nl80211_deauthenticate() can
result in a locally generated de-authentication event. To avoid getting
this extra event ignore_next_local_deauth flag is set, and should be
cleared when the next local deauth event is received. However, it is not
cleared when the event shows up after the wpa_supplicant has started a
connection with a new AP, and as a result it might ignore future
deauth event from the driver.

Fix this by clearing the flag if the event is locally generated.

Signed-off-by: Ayala Beker <ayala.beker at intel.com>
---
 src/drivers/driver_nl80211_event.c | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c
index cfede2a..c5f24c1 100644
--- a/src/drivers/driver_nl80211_event.c
+++ b/src/drivers/driver_nl80211_event.c
@@ -639,10 +639,21 @@ static void mlme_event_deauth_disassoc(struct wpa_driver_nl80211_data *drv,
 			 * Avoid issues with some roaming cases where
 			 * disconnection event for the old AP may show up after
 			 * we have started connection with the new AP.
+			 * In case of locally generated event clear
+			 * ignore_next_local_deauth as well, to avoid next local
+			 * deauth event be wrongly ignored.
 			 */
-			wpa_printf(MSG_DEBUG, "nl80211: Ignore deauth/disassoc event from old AP " MACSTR " when already authenticating with " MACSTR,
-				   MAC2STR(bssid),
-				   MAC2STR(drv->auth_attempt_bssid));
+			if (!os_memcmp(mgmt->sa, drv->first_bss->addr,
+				       ETH_ALEN)) {
+				wpa_printf(MSG_DEBUG,
+					   "nl80211: Received a locally generated deauth event. Clear ignore_next_local_deauth flag");
+				drv->ignore_next_local_deauth = 0;
+			} else {
+				wpa_printf(MSG_DEBUG,
+					   "nl80211: Ignore deauth/disassoc event from old AP " MACSTR " when already authenticating with " MACSTR,
+					   MAC2STR(bssid),
+					   MAC2STR(drv->auth_attempt_bssid));
+			}
 			return;
 		}
 
-- 
1.9.1



From ilan.peer at intel.com  Tue Nov  3 06:25:01 2015
From: ilan.peer at intel.com (Ilan Peer)
Date: Tue,  3 Nov 2015 16:25:01 +0200
Subject: [PATCH 6/6] wpa_supplicant: Clear send action work without waiting
In-Reply-To: <1446560701-30841-1-git-send-email-ilan.peer@intel.com>
References: <1446560701-30841-1-git-send-email-ilan.peer@intel.com>
Message-ID: <1446560701-30841-7-git-send-email-ilan.peer@intel.com>

From: Avraham Stern <avraham.stern at intel.com>

When clearing pending tx action to start a new P2P operation like
P2P_FIND or P2P_LISTEN, wpas_p2p_action_clear_tx() is used to clear
the send action work. However, in cases that the action work has wait
time, it is not cleared immediately but only after the wait time ends.
This may cause delay in starting the P2P operation.

Fix that by always clearing the send action work immediately.

Signed-off-by: Avraham Stern <avraham.stern at intel.com>
---
 wpa_supplicant/p2p_supplicant.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 59ca368..402ceda 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -6346,7 +6346,8 @@ static void wpas_p2p_clear_pending_action_tx(struct wpa_supplicant *wpa_s)
 	if (!offchannel_pending_action_tx(wpa_s))
 		return;
 
-	wpas_p2p_action_tx_clear(wpa_s);
+	if (wpa_s->p2p_send_action_work)
+		wpas_p2p_free_send_action_work(wpa_s);
 
 	wpa_printf(MSG_DEBUG, "P2P: Drop pending Action TX due to new "
 		   "operation request");
-- 
1.9.1



From ilan.peer at intel.com  Tue Nov  3 06:24:59 2015
From: ilan.peer at intel.com (Ilan Peer)
Date: Tue,  3 Nov 2015 16:24:59 +0200
Subject: [PATCH 4/6] tests: Test no P2P GO move when invitation is in progress
In-Reply-To: <1446560701-30841-1-git-send-email-ilan.peer@intel.com>
References: <1446560701-30841-1-git-send-email-ilan.peer@intel.com>
Message-ID: <1446560701-30841-5-git-send-email-ilan.peer@intel.com>

Add a test to verify that a P2P GO does not start a CSA
once invitation signalling is done, and the P2P client is
about to connect.

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
 tests/hwsim/test_p2p_channel.py | 64 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/tests/hwsim/test_p2p_channel.py b/tests/hwsim/test_p2p_channel.py
index 53e4ea5..dd89df1 100644
--- a/tests/hwsim/test_p2p_channel.py
+++ b/tests/hwsim/test_p2p_channel.py
@@ -918,3 +918,67 @@ def test_p2p_go_move_scm_multi(dev, apdev, params):
     finally:
         dev[0].global_request("P2P_SET disallow_freq ")
         dev[0].global_request("SET p2p_go_freq_change_policy 2")
+
+def test_p2p_delay_go_csa(dev, apdev, params):
+    """P2P GO CSA delayed when inviting a P2P Device to an active P2P Group [long]"""
+    if not params['long']:
+        raise HwsimSkip("Skip test case with long duration due to --long not specified")
+
+    with HWSimRadio(n_channels=2) as (radio, iface):
+        wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
+        wpas.interface_add(iface)
+
+        wpas.global_request("SET p2p_no_group_iface 0")
+
+        if wpas.get_mcc() < 2:
+           raise Exception("New radio does not support MCC")
+
+        addr0 = wpas.p2p_dev_addr()
+        addr1 = dev[1].p2p_dev_addr()
+
+        try:
+            hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": 'bss-2.4ghz',
+                                                        "channel": '1' })
+
+            wpas.connect("bss-2.4ghz", key_mgmt="NONE", scan_freq="2412")
+
+            dev[1].p2p_listen();
+	    if not wpas.discover_peer(addr1, social=True):
+		raise Exception("Peer " + addr1 + " not found")
+
+            wpas.global_request("SET p2p_go_freq_change_policy 0")
+	    wpas.dump_monitor()
+
+            logger.info("Start GO on channel 6")
+            res = autogo(wpas, freq=2437)
+	    go_start = time.time();
+            if res['freq'] != "2437":
+               raise Exception("GO set on a freq=%s instead of 2437" % res['freq'])
+
+	    if not dev[1].discover_peer(addr0, social=False):
+		raise Exception("Peer " + addr1 + " not found")
+
+            pin = dev[1].wps_read_pin()
+	    dev[1].global_request("P2P_CONNECT " + addr0 + " " + pin + " join auth")
+            dev[1].p2p_listen();
+
+            logger.info("Sleep while P2P GO CSA is not allowed")
+	    ev = wpas.wait_group_event(["P2P-REMOVE-AND-REFORM-GROUP",
+		                       "AP-CSA-FINISHED"], timeout= 29.9 -
+				       (time.time() - go_start))
+	    if ev is not None:
+	        raise Exception("Unexpected + " + ev + " event")
+
+            logger.info("Starting invitation")
+            wpas.p2p_go_authorize_client(pin)
+	    wpas.global_request("P2P_INVITE group=" + wpas.group_ifname + " peer=" + addr1)
+	    ev = dev[1].wait_global_event(["P2P-INVITATION-RECEIVED",
+		    "P2P-GROUP-STARTED"], timeout=10)
+
+	    if ev is None:
+	        raise Exception("Timeout on invitation on peer")
+	    if "P2P-INVITATION-RECEIVED" in ev:
+                raise Exception("Unexpected request to accept pre-authorized invitation")
+
+        finally:
+            wpas.global_request("SET p2p_go_freq_change_policy 2")
-- 
1.9.1



From ilan.peer at intel.com  Tue Nov  3 06:25:00 2015
From: ilan.peer at intel.com (Ilan Peer)
Date: Tue,  3 Nov 2015 16:25:00 +0200
Subject: [PATCH 5/6] AP: Avoid 20/40 MHz co-ex scan if PRI/SEC switch is not
 allowed
In-Reply-To: <1446560701-30841-1-git-send-email-ilan.peer@intel.com>
References: <1446560701-30841-1-git-send-email-ilan.peer@intel.com>
Message-ID: <1446560701-30841-6-git-send-email-ilan.peer@intel.com>

From: Alexander Bondar <alexander.bondar at intel.com>

When an AP is started on the 5.2 band with 40MHz bandwidth, a
scan is issued in order to handle 20/40 MHz coexistence. However,
the scan is issued even if iface->conf->no_pri_sec_switch is set,
which is redundant.

Fix this by checking iface->conf->no_pri_sec_switch before starting
the scan.

Signed-off-by: Alexander Bondar <alexander.bondar at intel.com>
---
 src/ap/hw_features.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c
index fc8786d..3607066 100644
--- a/src/ap/hw_features.c
+++ b/src/ap/hw_features.c
@@ -472,8 +472,9 @@ static int ieee80211n_check_40mhz(struct hostapd_iface *iface)
 	struct wpa_driver_scan_params params;
 	int ret;
 
-	if (!iface->conf->secondary_channel)
-		return 0; /* HT40 not used */
+	/* Check that HT40 is used and PRI / SEC switch is allowed */
+	if (!iface->conf->secondary_channel || iface->conf->no_pri_sec_switch)
+		return 0;
 
 	hostapd_set_state(iface, HAPD_IFACE_HT_SCAN);
 	wpa_printf(MSG_DEBUG, "Scan for neighboring BSSes prior to enabling "
-- 
1.9.1



From ilan.peer at intel.com  Tue Nov  3 06:30:10 2015
From: ilan.peer at intel.com (Ilan Peer)
Date: Tue,  3 Nov 2015 16:30:10 +0200
Subject: [PATCH 2/4] ctrl_iface: add an option to create interface of a
 certain type
In-Reply-To: <1446561012-2739-1-git-send-email-ilan.peer@intel.com>
References: <1446561012-2739-1-git-send-email-ilan.peer@intel.com>
Message-ID: <1446561012-2739-3-git-send-email-ilan.peer@intel.com>

From: Avraham Stern <avraham.stern at intel.com>

Some drivers do not support having two station interfaces, so the
fact that wpa_supplicant always creates a new interface in station
mode, even if it will be used as another type of interface, may
prevent wpa_supplicant from creating new interfaces.
Allow setting the interface type when a new interface is created
so that interfaces of supported types can be created.

Currently supported types are station ("sta") and AP ("ap"). If the
interface type is not specified, a station interface will be created.

Signed-off-by: Avraham Stern <avraham.stern at intel.com>
---
 wpa_supplicant/ctrl_iface.c | 30 ++++++++++++++++++++++++++----
 1 file changed, 26 insertions(+), 4 deletions(-)

diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 9538c51..e3c8d5b 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -8858,10 +8858,11 @@ static int wpa_supplicant_global_iface_add(struct wpa_global *global,
 	struct wpa_supplicant *wpa_s;
 	unsigned int create_iface = 0;
 	u8 mac_addr[ETH_ALEN];
+	enum wpa_driver_if_type type = WPA_IF_STATION;
 
 	/*
 	 * <ifname>TAB<confname>TAB<driver>TAB<ctrl_interface>TAB<driver_param>
-	 * TAB<bridge_ifname>[TAB<create>]
+	 * TAB<bridge_ifname>[TAB<create>TAB<interface_type>]
 	 */
 	wpa_printf(MSG_DEBUG, "CTRL_IFACE GLOBAL INTERFACE_ADD '%s'", cmd);
 
@@ -8929,9 +8930,30 @@ static int wpa_supplicant_global_iface_add(struct wpa_global *global,
 		if (!extra[0])
 			break;
 
-		if (os_strcmp(extra, "create") == 0)
+		if (os_strcmp(extra, "create") == 0) {
 			create_iface = 1;
-		else {
+			if (!pos)
+				break;
+
+			if (os_strcmp(pos, "sta") == 0) {
+				type = WPA_IF_STATION;
+			} else if (os_strcmp(pos, "ap") == 0) {
+				type = WPA_IF_AP_BSS;
+			} else {
+				wpa_printf(MSG_DEBUG,
+					   "INTERFACE_ADD unsupported interface type: '%s'",
+					   pos);
+				return -1;
+			}
+
+			pos = os_strchr(pos, '\t');
+			if (pos) {
+				wpa_printf(MSG_DEBUG,
+					   "INTERFACE_ADD unsupported interface type: '%s'",
+					   pos);
+				return -1;
+			}
+		} else {
 			wpa_printf(MSG_DEBUG,
 				   "INTERFACE_ADD unsupported extra parameter: '%s'",
 				   extra);
@@ -8944,7 +8966,7 @@ static int wpa_supplicant_global_iface_add(struct wpa_global *global,
 			   iface.ifname);
 		if (!global->ifaces)
 			return -1;
-		if (wpa_drv_if_add(global->ifaces, WPA_IF_STATION, iface.ifname,
+		if (wpa_drv_if_add(global->ifaces, type, iface.ifname,
 				   NULL, NULL, NULL, mac_addr, NULL) < 0) {
 			wpa_printf(MSG_ERROR,
 				   "CTRL_IFACE interface creation failed");
-- 
1.9.1



From ilan.peer at intel.com  Tue Nov  3 06:30:08 2015
From: ilan.peer at intel.com (Ilan Peer)
Date: Tue,  3 Nov 2015 16:30:08 +0200
Subject: [PATCH 0/4] Add support for creating a new AP interface
Message-ID: <1446561012-2739-1-git-send-email-ilan.peer@intel.com>

Some devices support only a single station interface. Trying to
create a new AP interface through the wpa_supplicant would fail
on such devices, as the new interface is always created and
setup as a station interface before changing it to an AP interface.

This patch set adds the support for creating a new AP interface
without first setting up a station interface.

Avraham Stern (3):
  driver: Make setting up AP optional when creating AP interface
  ctrl_iface: add an option to create interface of a certain type
  wpa_cli: Add an option to set created interface type

Ilan Peer (1):
  tests: wpa_supplicant interface creation in AP mode

 src/ap/ap_drv_ops.c           |  2 +-
 src/drivers/driver.h          |  3 ++-
 src/drivers/driver_nl80211.c  |  5 +++--
 tests/hwsim/test_wpas_ctrl.py | 32 ++++++++++++++++++++++++++++++++
 tests/hwsim/wpasupplicant.py  |  4 +++-
 wpa_supplicant/ctrl_iface.c   | 30 ++++++++++++++++++++++++++----
 wpa_supplicant/driver_i.h     |  2 +-
 wpa_supplicant/wpa_cli.c      | 12 +++++++-----
 8 files changed, 75 insertions(+), 15 deletions(-)

-- 
1.9.1



From ilan.peer at intel.com  Tue Nov  3 06:30:09 2015
From: ilan.peer at intel.com (Ilan Peer)
Date: Tue,  3 Nov 2015 16:30:09 +0200
Subject: [PATCH 1/4] driver: Make setting up AP optional when creating AP
 interface
In-Reply-To: <1446561012-2739-1-git-send-email-ilan.peer@intel.com>
References: <1446561012-2739-1-git-send-email-ilan.peer@intel.com>
Message-ID: <1446561012-2739-2-git-send-email-ilan.peer@intel.com>

From: Avraham Stern <avraham.stern at intel.com>

When an AP interface it created, it is also setup and subscribes
for management frames etc. However, when the interface is added by
wpa_supplicant, setting up for AP operations is redundant because
it will be done by wpa_supplicant on wpa_drv_init() when setting
the interface mode to AP.

In addition, it may cause wpa_supplicant to fail initializing the
interface as it will try to subscribe for management frames on this
interface but the interface is already registered.

Change this, so when adding an AP interface, make setting up the AP
optional, and use it only when the interface is added by hostapd but not
when it is added by wpa_supplicant.

Signed-off-by: Avraham Stern <avraham.stern at intel.com>
---
 src/ap/ap_drv_ops.c          | 2 +-
 src/drivers/driver.h         | 3 ++-
 src/drivers/driver_nl80211.c | 5 +++--
 wpa_supplicant/driver_i.h    | 2 +-
 4 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
index 656f0a7..b390450 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -468,7 +468,7 @@ int hostapd_if_add(struct hostapd_data *hapd, enum wpa_driver_if_type type,
 		return -1;
 	return hapd->driver->if_add(hapd->drv_priv, type, ifname, addr,
 				    bss_ctx, drv_priv, force_ifname, if_addr,
-				    bridge, use_existing);
+				    bridge, use_existing, 1);
 }
 
 
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 09c4fa1..7d7e503 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -2407,12 +2407,13 @@ struct wpa_driver_ops {
 	 *	change interface address)
 	 * @bridge: Bridge interface to use or %NULL if no bridge configured
 	 * @use_existing: Whether to allow existing interface to be used
+	 * @setup_ap: Whether to setup AP for %WPA_IF_AP_BSS interfaces
 	 * Returns: 0 on success, -1 on failure
 	 */
 	int (*if_add)(void *priv, enum wpa_driver_if_type type,
 		      const char *ifname, const u8 *addr, void *bss_ctx,
 		      void **drv_priv, char *force_ifname, u8 *if_addr,
-		      const char *bridge, int use_existing);
+		      const char *bridge, int use_existing, int setup_ap);
 
 	/**
 	 * if_remove - Remove a virtual interface
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index e83a3df..43dd0b1 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -5903,7 +5903,8 @@ static int wpa_driver_nl80211_if_add(void *priv, enum wpa_driver_if_type type,
 				     const char *ifname, const u8 *addr,
 				     void *bss_ctx, void **drv_priv,
 				     char *force_ifname, u8 *if_addr,
-				     const char *bridge, int use_existing)
+				     const char *bridge, int use_existing,
+				     int setup_ap)
 {
 	enum nl80211_iftype nlmode;
 	struct i802_bss *bss = priv;
@@ -5987,7 +5988,7 @@ static int wpa_driver_nl80211_if_add(void *priv, enum wpa_driver_if_type type,
 		os_memcpy(if_addr, new_addr, ETH_ALEN);
 	}
 
-	if (type == WPA_IF_AP_BSS) {
+	if (type == WPA_IF_AP_BSS && setup_ap) {
 		struct i802_bss *new_bss = os_zalloc(sizeof(*new_bss));
 		if (new_bss == NULL) {
 			if (added)
diff --git a/wpa_supplicant/driver_i.h b/wpa_supplicant/driver_i.h
index f325154..3c2d80b 100644
--- a/wpa_supplicant/driver_i.h
+++ b/wpa_supplicant/driver_i.h
@@ -401,7 +401,7 @@ static inline int wpa_drv_if_add(struct wpa_supplicant *wpa_s,
 	if (wpa_s->driver->if_add)
 		return wpa_s->driver->if_add(wpa_s->drv_priv, type, ifname,
 					     addr, bss_ctx, NULL, force_ifname,
-					     if_addr, bridge, 0);
+					     if_addr, bridge, 0, 0);
 	return -1;
 }
 
-- 
1.9.1



From ilan.peer at intel.com  Tue Nov  3 06:30:11 2015
From: ilan.peer at intel.com (Ilan Peer)
Date: Tue,  3 Nov 2015 16:30:11 +0200
Subject: [PATCH 3/4] wpa_cli: Add an option to set created interface type
In-Reply-To: <1446561012-2739-1-git-send-email-ilan.peer@intel.com>
References: <1446561012-2739-1-git-send-email-ilan.peer@intel.com>
Message-ID: <1446561012-2739-4-git-send-email-ilan.peer@intel.com>

From: Avraham Stern <avraham.stern at intel.com>

Add an option to set the interface type when creating
a driver interface.

Signed-off-by: Avraham Stern <avraham.stern at intel.com>
---
 wpa_supplicant/wpa_cli.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
index 91ddb5a..a0f84bf 100644
--- a/wpa_supplicant/wpa_cli.c
+++ b/wpa_supplicant/wpa_cli.c
@@ -1872,14 +1872,15 @@ static int wpa_cli_cmd_interface_add(struct wpa_ctrl *ctrl, int argc,
 
 	/*
 	 * INTERFACE_ADD <ifname>TAB<confname>TAB<driver>TAB<ctrl_interface>TAB
-	 * <driver_param>TAB<bridge_name>[TAB<create>]
+	 * <driver_param>TAB<bridge_name>[TAB<create>[TAB<type>]]
 	 */
 	res = os_snprintf(cmd, sizeof(cmd),
-			  "INTERFACE_ADD %s\t%s\t%s\t%s\t%s\t%s\t%s",
+			  "INTERFACE_ADD %s\t%s\t%s\t%s\t%s\t%s\t%s\t%s",
 			  argv[0],
 			  argc > 1 ? argv[1] : "", argc > 2 ? argv[2] : "",
 			  argc > 3 ? argv[3] : "", argc > 4 ? argv[4] : "",
-			  argc > 5 ? argv[5] : "", argc > 6 ? argv[6] : "");
+			  argc > 5 ? argv[5] : "", argc > 6 ? argv[6] : "",
+			  argc > 7 ? argv[7] : "");
 	if (os_snprintf_error(sizeof(cmd), res))
 		return -1;
 	cmd[sizeof(cmd) - 1] = '\0';
@@ -3044,8 +3045,9 @@ static const struct wpa_cli_cmd wpa_cli_commands[] = {
 	{ "interface_add", wpa_cli_cmd_interface_add, NULL,
 	  cli_cmd_flag_none,
 	  "<ifname> <confname> <driver> <ctrl_interface> <driver_param>\n"
-	  "  <bridge_name> = adds new interface, all parameters but <ifname>\n"
-	  "  are optional" },
+	  "  <bridge_name> <create> <type> = adds new interface, all\n"
+	  " parameters but <ifname> are optional. Supported types are\n"
+	  " station ('sta') and AP ('ap')" },
 	{ "interface_remove", wpa_cli_cmd_interface_remove, NULL,
 	  cli_cmd_flag_none,
 	  "<ifname> = removes the interface" },
-- 
1.9.1



From ilan.peer at intel.com  Tue Nov  3 06:30:12 2015
From: ilan.peer at intel.com (Ilan Peer)
Date: Tue,  3 Nov 2015 16:30:12 +0200
Subject: [PATCH 4/4] tests: wpa_supplicant interface creation in AP mode
In-Reply-To: <1446561012-2739-1-git-send-email-ilan.peer@intel.com>
References: <1446561012-2739-1-git-send-email-ilan.peer@intel.com>
Message-ID: <1446561012-2739-5-git-send-email-ilan.peer@intel.com>

Add a test case that creates a new interface in AP mode.

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
 tests/hwsim/test_wpas_ctrl.py | 32 ++++++++++++++++++++++++++++++++
 tests/hwsim/wpasupplicant.py  |  4 +++-
 2 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/tests/hwsim/test_wpas_ctrl.py b/tests/hwsim/test_wpas_ctrl.py
index 1f2daae..a699d8f 100644
--- a/tests/hwsim/test_wpas_ctrl.py
+++ b/tests/hwsim/test_wpas_ctrl.py
@@ -16,6 +16,7 @@ import hwsim_utils
 from hwsim import HWSimRadio
 from wpasupplicant import WpaSupplicant
 from utils import alloc_fail
+from test_wpas_ap import wait_ap_ready
 
 def test_wpas_ctrl_network(dev):
     """wpa_supplicant ctrl_iface network set/get"""
@@ -1478,6 +1479,37 @@ def test_wpas_ctrl_interface_add(dev, apdev):
     dev[0].global_request("INTERFACE_REMOVE " + ifname)
     hwsim_utils.test_connectivity(dev[0], hapd)
 
+def test_wpas_ctrl_interface_add_ap(dev, apdev):
+    """wpa_supplicant INTERFACE_ADD/REMOVE AP interface"""
+
+    with HWSimRadio() as (radio, iface):
+        wpas0 = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
+        wpas0.interface_add(iface)
+
+        ifname = "test-wpas-ap"
+	wpas0.interface_add(ifname, create=True, if_type='ap')
+	wpas = WpaSupplicant(ifname=ifname)
+
+	id = wpas.add_network()
+	wpas.set_network(id, "mode", "2")
+	wpas.set_network_quoted(id, "ssid", "wpas-ap-open")
+	wpas.set_network(id, "key_mgmt", "NONE")
+	wpas.set_network(id, "frequency", "2412")
+	wpas.set_network(id, "scan_freq", "2412")
+	wpas.select_network(id)
+	wait_ap_ready(wpas)
+
+	dev[1].connect("wpas-ap-open", key_mgmt="NONE", scan_freq="2412")
+	dev[2].connect("wpas-ap-open", key_mgmt="NONE", scan_freq="2412")
+
+	hwsim_utils.test_connectivity(wpas, dev[1])
+	hwsim_utils.test_connectivity(dev[1], dev[2])
+
+	dev[1].request("DISCONNECT")
+	dev[2].request("DISCONNECT")
+
+	wpas0.global_request("INTERFACE_REMOVE " + ifname)
+
 def test_wpas_ctrl_interface_add_many(dev, apdev):
     """wpa_supplicant INTERFACE_ADD/REMOVE with vif creation/removal (many)"""
     try:
diff --git a/tests/hwsim/wpasupplicant.py b/tests/hwsim/wpasupplicant.py
index ea9894b..abc0ae5 100644
--- a/tests/hwsim/wpasupplicant.py
+++ b/tests/hwsim/wpasupplicant.py
@@ -55,7 +55,7 @@ class WpaSupplicant:
 
     def interface_add(self, ifname, config="", driver="nl80211",
                       drv_params=None, br_ifname=None, create=False,
-                      set_ifname=True, all_params=False):
+                      set_ifname=True, all_params=False, if_type=None):
         try:
             groups = subprocess.check_output(["id"])
             group = "admin" if "(admin)" in groups else "adm"
@@ -74,6 +74,8 @@ class WpaSupplicant:
                 if not drv_params:
                     cmd += '\t'
             cmd += '\tcreate'
+	    if if_type:
+	        cmd += '\t' + if_type
         if all_params and not create:
             if not br_ifname:
                 cmd += '\t'
-- 
1.9.1



From som6000 at gmail.com  Tue Nov  3 04:59:12 2015
From: som6000 at gmail.com (Somdas Bandyopadhyay)
Date: Tue, 3 Nov 2015 18:29:12 +0530
Subject: [PATCH] Support for launching Chrome browser(if present) from
 HS20 client
In-Reply-To: <1446549279.29010.17.camel@sipsolutions.net>
References: <CAG8jGXM67FYagtf8Rz2GKLbL1ik4oem7w6Azex-7BeCcrpkouw@mail.gmail.com>
 <1446546891.29010.15.camel@sipsolutions.net>
 <CAG8jGXPTnTpYb_cL6XfBXFEvTqo8dFw5iCGOb+8q+AbHi_15DA@mail.gmail.com>
 <CAG8jGXPM13O0qsF5_74TUeFAtnGc6XDHvJBsZFo3-3VpqTepuA@mail.gmail.com>
 <1446549279.29010.17.camel@sipsolutions.net>
Message-ID: <CAG8jGXOQT3e6e0vXat0D92k0=ZcQmvVkuFx5mWfcOx7VTZZ8Pg@mail.gmail.com>

I agree that if the user  saves his/her option then the pop up will
not be shown. PFA the patch that can be used to give the option to the
user for selecting his/her browser. One thing is for sure that we
should not be always launching the native android browser as it is not
present in most of the devices.  I would anyways prefer that we
directly launch the chrome browser (patch submitted earlier in the
thread), instead of showing a pop up to the user for selecting the
browser.

On Tue, Nov 3, 2015 at 4:44 PM, Johannes Berg <johannes at sipsolutions.net> wrote:
> On Tue, 2015-11-03 at 16:24 +0530, Somdas Bandyopadhyay wrote:
>> HI Johannes,
>>
>> The code already uses /system/bin/am start -a
>> android.intent.action.VIEW [...] .. as suggested by you. Not
>> specifying the -n argument will give the option to the user to select
>> the browser. But it pops out a dialog for the user to select the
>> browser, which is an extra step and might irritate the user also.
>>
>
> Fair enough. Does it *always* do that extra step though? I thought it
> remembered the choice - is that dependent on the caller, so for every
> new caller it would ask again?
>
> Anyway, it's all Jouni's decision in the end :)
>
> johannes



-- 
Thanks and regards,
Somdas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Give-user-the-option-for-selecting-browser-for-provi.patch
Type: application/octet-stream
Size: 1490 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/hostap/attachments/20151103/c33a5cee/attachment.obj>

From j at w1.fi  Tue Nov  3 06:14:53 2015
From: j at w1.fi (Jouni Malinen)
Date: Tue, 3 Nov 2015 16:14:53 +0200
Subject: [PATCH] Support for launching Chrome browser(if present) from
 HS20 client
In-Reply-To: <CAG8jGXOQT3e6e0vXat0D92k0=ZcQmvVkuFx5mWfcOx7VTZZ8Pg@mail.gmail.com>
References: <CAG8jGXM67FYagtf8Rz2GKLbL1ik4oem7w6Azex-7BeCcrpkouw@mail.gmail.com>
 <1446546891.29010.15.camel@sipsolutions.net>
 <CAG8jGXPTnTpYb_cL6XfBXFEvTqo8dFw5iCGOb+8q+AbHi_15DA@mail.gmail.com>
 <CAG8jGXPM13O0qsF5_74TUeFAtnGc6XDHvJBsZFo3-3VpqTepuA@mail.gmail.com>
 <1446549279.29010.17.camel@sipsolutions.net>
 <CAG8jGXOQT3e6e0vXat0D92k0=ZcQmvVkuFx5mWfcOx7VTZZ8Pg@mail.gmail.com>
Message-ID: <20151103141453.GA5625@w1.fi>

On Tue, Nov 03, 2015 at 06:29:12PM +0530, Somdas Bandyopadhyay wrote:
> I agree that if the user  saves his/her option then the pop up will
> not be shown. PFA the patch that can be used to give the option to the
> user for selecting his/her browser. One thing is for sure that we
> should not be always launching the native android browser as it is not
> present in most of the devices.  I would anyways prefer that we
> directly launch the chrome browser (patch submitted earlier in the
> thread), instead of showing a pop up to the user for selecting the
> browser.

In general, I'm not sure I'd really recommend use of the default browser
for Hotspot 2.0 OSU purposes on any platforms, i.e., I'd much rather use
something similar to browser-wpadebug.c than browser-android.c.
Obviously, wpabebug is unlikely to be the best choice for such an app,
but it is an example that shows how simple it is to implement the needed
functionality.

The main benefits of using a custom app instead of default browser are
both in usability (clean bring up of the web browser and robust way of
closing it (that "input keyevent KEYCODE_HOME" is for the default
browser is far from optimal) and in security (maintain separate context
that does not share cookies or other stored values with the main
browser). It should be noted that the URL for the Hotspot 2.0 use cases
comes from an external device and it is not exactly good to accept any
random URL and launch it in a web browser that is used for most of the
normal web site browsing on the device.

-- 
Jouni Malinen                                            PGP id EFC895FA


From greearb at candelatech.com  Tue Nov  3 07:29:48 2015
From: greearb at candelatech.com (Ben Greear)
Date: Tue, 3 Nov 2015 07:29:48 -0800
Subject: hostapd and 802.11r
Message-ID: <5638D2EC.3040306@candelatech.com>

Hello!

Does hostapd have the ability to do 802.11r between 2+ APs?

I know at least some implementations of 802.11r require a controller
box, so I'm curious if hostapd somehow gets around that?

Or, is there an open-source controller that works with hostapd?

Thanks,
Ben

-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



From chaitanya.mgit at gmail.com  Tue Nov  3 08:08:20 2015
From: chaitanya.mgit at gmail.com (Krishna Chaitanya)
Date: Tue, 3 Nov 2015 21:38:20 +0530
Subject: [PATCHv2] offchannel: Cancel the pending_action TX wait, before
 starting new one.
In-Reply-To: <1446477028-23118-1-git-send-email-chaitanya.mgit@gmail.com>
References: <1446477028-23118-1-git-send-email-chaitanya.mgit@gmail.com>
Message-ID: <CABPxzYJDfy7SFk9XhY64UXPt=9gkN0j7G0jh_rj7xsVUbJ2btg@mail.gmail.com>

On Mon, Nov 2, 2015 at 8:40 PM, Chaitanya T K <chaitanya.mgit at gmail.com> wrote:
> From: tkc <chaitanya.mgit at gmail.com>
>
> Before the tx_status is received for the action frame, if we
> get another request, we respond to that by freeing the memory
> for pending_action_tx, but we don't cancel the TX wait, so
> in the kernel the ROC will not be cancelled.
>
> Due to above issue, wpa_supplicant assumes that all pending
> RoC's are cancelled and proceeds with interface creation and
> connection, where as state in mac80211/driver will be roc_in_progress.
>
> This is leading to issues at driver level.
>
> Signed-off-by: Chaitanya T K <chaitanya.mgit at gmail.com>
> ---
> V2: Fix 2 from's.
>     Remove the unnecessary braces.
> ---
>  wpa_supplicant/offchannel.c |   12 +++---------
>  1 file changed, 3 insertions(+), 9 deletions(-)
>
> diff --git a/wpa_supplicant/offchannel.c b/wpa_supplicant/offchannel.c
> index 6b3f83c..581c5f6 100644
> --- a/wpa_supplicant/offchannel.c
> +++ b/wpa_supplicant/offchannel.c
> @@ -253,15 +253,9 @@ int offchannel_send_action(struct wpa_supplicant *wpa_s, unsigned int freq,
>
>         wpa_s->pending_action_tx_status_cb = tx_cb;
>
> -       if (wpa_s->pending_action_tx) {
> -               wpa_printf(MSG_DEBUG, "Off-channel: Dropped pending Action "
> -                          "frame TX to " MACSTR " (pending_action_tx=%p)",
> -                          MAC2STR(wpa_s->pending_action_dst),
> -                          wpa_s->pending_action_tx);

I think we should retain this print to identify if its a proper complete
or dropping pending. Anyways will wait for comments before sending V3.

.


From j at w1.fi  Tue Nov  3 11:00:12 2015
From: j at w1.fi (Jouni Malinen)
Date: Tue, 3 Nov 2015 21:00:12 +0200
Subject: hostapd and 802.11r
In-Reply-To: <5638D2EC.3040306@candelatech.com>
References: <5638D2EC.3040306@candelatech.com>
Message-ID: <20151103190012.GA19639@w1.fi>

On Tue, Nov 03, 2015 at 07:29:48AM -0800, Ben Greear wrote:
> Does hostapd have the ability to do 802.11r between 2+ APs?

Yes.

> I know at least some implementations of 802.11r require a controller
> box, so I'm curious if hostapd somehow gets around that?

hostapd can exchange messages with other hostapd-based devices to manage
FT AP-AP operations.
 
-- 
Jouni Malinen                                            PGP id EFC895FA


From greearb at candelatech.com  Tue Nov  3 11:03:55 2015
From: greearb at candelatech.com (Ben Greear)
Date: Tue, 3 Nov 2015 11:03:55 -0800
Subject: hostapd and 802.11r
In-Reply-To: <20151103190012.GA19639@w1.fi>
References: <5638D2EC.3040306@candelatech.com> <20151103190012.GA19639@w1.fi>
Message-ID: <5639051B.6020404@candelatech.com>

On 11/03/2015 11:00 AM, Jouni Malinen wrote:
> On Tue, Nov 03, 2015 at 07:29:48AM -0800, Ben Greear wrote:
>> Does hostapd have the ability to do 802.11r between 2+ APs?
>
> Yes.
>
>> I know at least some implementations of 802.11r require a controller
>> box, so I'm curious if hostapd somehow gets around that?
>
> hostapd can exchange messages with other hostapd-based devices to manage
> FT AP-AP operations.
>
>

Oooh, nice.  Anyone have some example configs that have this enabled?

I'd like to give it a try...

Thanks,
Ben

-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



From michael-dev at fami-braun.de  Tue Nov  3 12:26:29 2015
From: michael-dev at fami-braun.de (M. Braun)
Date: Tue, 3 Nov 2015 21:26:29 +0100
Subject: hostapd and 802.11r
In-Reply-To: <5639051B.6020404@candelatech.com>
References: <5638D2EC.3040306@candelatech.com> <20151103190012.GA19639@w1.fi>
 <5639051B.6020404@candelatech.com>
Message-ID: <56391875.7060104@fami-braun.de>

Hi,

I'm running this for about half a year with about 80 APs, full dynamic
VLANs, 1X and PSK and about 2k registered and 400 active devices.

>> hostapd can exchange messages with other hostapd-based devices to
>> manage FT AP-AP operations.
> Oooh, nice.  Anyone have some example configs that have this enabled?

I've just published [1] lurking around for some time unpublished. Hope
it helps. Although that also includes some settings not yet send
upstream, it should also cover everything needed for operation of
current upstream hostapd.

Regards,
 M. Braun

[1]
https://blog.fem.tu-ilmenau.de/archives/1002-HowTo-enable-WiFi-roaming-with-hostapd-and-VLANs.html


Am 03.11.2015 um 20:03 schrieb Ben Greear:
> On 11/03/2015 11:00 AM, Jouni Malinen wrote:
>> On Tue, Nov 03, 2015 at 07:29:48AM -0800, Ben Greear wrote:
>>> Does hostapd have the ability to do 802.11r between 2+ APs?
>>
>> Yes.
>>
>>> I know at least some implementations of 802.11r require a controller
>>> box, so I'm curious if hostapd somehow gets around that?
>>
>>
>>
> 
> 
> I'd like to give it a try...
> 
> Thanks,
> Ben
> 



From greearb at candelatech.com  Wed Nov  4 16:49:38 2015
From: greearb at candelatech.com (greearb at candelatech.com)
Date: Wed,  4 Nov 2015 19:49:38 -0500
Subject: [PATCH 1/2] nl80211-scan:  add debug message for passive scanning.
Message-ID: <1446684579-30288-1-git-send-email-greearb@candelatech.com>

From: Ben Greear <greearb at candelatech.com>

This is more obvious than looking for the lack of 'Scan SSID'
messages.

Signed-off-by: Ben Greear <greearb at candelatech.com>
---
 src/drivers/driver_nl80211_scan.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/drivers/driver_nl80211_scan.c b/src/drivers/driver_nl80211_scan.c
index 1a64cbe..12d4b7b 100644
--- a/src/drivers/driver_nl80211_scan.c
+++ b/src/drivers/driver_nl80211_scan.c
@@ -133,6 +133,8 @@ nl80211_scan_common(struct i802_bss *bss, u8 cmd,
 				goto fail;
 		}
 		nla_nest_end(msg, ssids);
+	} else {
+		wpa_printf(MSG_DEBUG, "nl80211: Passive Scan requested.");
 	}
 
 	i = nl80211_build_legacy_rateset(bss->adv_legacy_rates, 0, rates);
-- 
1.9.3



From greearb at candelatech.com  Wed Nov  4 16:49:39 2015
From: greearb at candelatech.com (greearb at candelatech.com)
Date: Wed,  4 Nov 2015 19:49:39 -0500
Subject: [PATCH 2/2] supplicant: Document passive_scan option for
 wpa_supplicant.conf
In-Reply-To: <1446684579-30288-1-git-send-email-greearb@candelatech.com>
References: <1446684579-30288-1-git-send-email-greearb@candelatech.com>
Message-ID: <1446684579-30288-2-git-send-email-greearb@candelatech.com>

From: Ben Greear <greearb at candelatech.com>

This should save the next person to need this behaviour some
time.

Signed-off-by: Ben Greear <greearb at candelatech.com>
---
 wpa_supplicant/wpa_supplicant.conf | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/wpa_supplicant/wpa_supplicant.conf b/wpa_supplicant/wpa_supplicant.conf
index 41c55ef..19979d0 100644
--- a/wpa_supplicant/wpa_supplicant.conf
+++ b/wpa_supplicant/wpa_supplicant.conf
@@ -118,6 +118,14 @@ eapol_version=1
 # networks are found, a new IBSS or AP mode network is created.
 ap_scan=1
 
+# Normal scans will do probe requests, which advertise the local station
+# to the world.  Normally this is fine, but users may wish to do passive
+# scanning where the radio should only listen quietly for beacons and not
+# do any probe requests.  Actual functionality may be driver dependent.
+# 0:  Do normal scans (default)
+# 1:  Do passive scans.
+#passive_scan=0
+
 # MPM residency
 # By default, wpa_supplicant implements the mesh peering manager (MPM) for an
 # open mesh. However, if the driver can implement the MPM, you may set this to
-- 
1.9.3



From jmm at riseup.net  Thu Nov  5 11:33:38 2015
From: jmm at riseup.net (Jo)
Date: Thu, 05 Nov 2015 20:33:38 +0100
Subject: Problems connecting with wpa_supplicant
Message-ID: <563BAF12.5060808@riseup.net>

Hi all, I've been trying to access my wifi net with wpa_supplicant in
two cases with the same .conf file.
	1. With the gentoo live --> It works (wpa.good.log)
	2. With my just-installed gentoo machine --> It fails (wpa.bad.log)

In those logs there is also the information of lspci, dmesg | grep
firmware and lsmod of both cases.

The lines that seems to notify the error in the bad log are the following:

nl80211: Drv Event 37 (NL80211_CMD_AUTHENTICATE) received for wlp8s0
nl80211: MLME event 37; timeout with e4:c1:46:f3:a5:52
wlp8s0: Event AUTH_TIMED_OUT (14) received
wlp8s0: SME: Authentication timed out

Any suggestion?

Thanks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wpa.good.log
Type: text/x-log
Size: 22158 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/hostap/attachments/20151105/48cf8002/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wpa.bad.log
Type: text/x-log
Size: 10689 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/hostap/attachments/20151105/48cf8002/attachment-0003.bin>

From samueltan at google.com  Thu Nov  5 12:04:42 2015
From: samueltan at google.com (Samuel Tan)
Date: Thu, 5 Nov 2015 12:04:42 -0800
Subject: [PATCH] external/wpa_supplicant8: Use libdbus rather than dbus-1
Message-ID: <CABctT5cK-uifsdzbZzNnVcXikmVerENKvxXxRxG2Cv0G6EhEtQ@mail.gmail.com>

>From b5844dcc755cc76dc8ef7e3062ed4c55ad288f6c Mon Sep 17 00:00:00 2001
From: Samuel Tan <samueltan at google.com>
Date: Thu, 5 Nov 2015 10:48:48 -0800
Subject: [PATCH] external/wpa_supplicant8: Use libdbus rather than dbus-1

The upstream wpa_supplicant uses the dbus-1 library when
it is compiled with D-Bus support. In Android, we imported
the D-Bus shared libraries under the name "libdbus", so
use this shared library instead of dbus-1 when compiling
WPA supplicant with D-Bus support.

Signed-off-by: Samuel Tan <samueltan at google.com>
---
 wpa_supplicant/Android.mk | 16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

diff --git a/wpa_supplicant/Android.mk b/wpa_supplicant/Android.mk
index ef698d0..50e3422 100644
--- a/wpa_supplicant/Android.mk
+++ b/wpa_supplicant/Android.mk
@@ -1343,12 +1343,6 @@ ifdef CONFIG_WPS
 DBUS_OBJS += dbus/dbus_old_handlers_wps.c
 endif
 DBUS_OBJS += dbus/dbus_dict_helpers.c
-ifndef DBUS_LIBS
-DBUS_LIBS := $(shell $(PKG_CONFIG) --libs dbus-1)
-endif
-ifndef DBUS_INCLUDE
-DBUS_INCLUDE := $(shell $(PKG_CONFIG) --cflags dbus-1)
-endif
 DBUS_CFLAGS += $(DBUS_INCLUDE)
 endif

@@ -1364,12 +1358,6 @@ endif
 ifdef CONFIG_P2P
 DBUS_OBJS += dbus/dbus_new_handlers_p2p.c
 endif
-ifndef DBUS_LIBS
-DBUS_LIBS := $(shell $(PKG_CONFIG) --libs dbus-1)
-endif
-ifndef DBUS_INCLUDE
-DBUS_INCLUDE := $(shell $(PKG_CONFIG) --cflags dbus-1)
-endif
 ifdef CONFIG_CTRL_IFACE_DBUS_INTRO
 DBUS_OBJS += dbus/dbus_new_introspect.c
 DBUS_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_INTRO
@@ -1384,7 +1372,6 @@ endif

 OBJS += $(DBUS_OBJS)
 L_CFLAGS += $(DBUS_CFLAGS)
-LIBS += $(DBUS_LIBS)

 ifdef CONFIG_READLINE
 OBJS_c += src/utils/edit_readline.c
@@ -1626,6 +1613,9 @@ endif
 LOCAL_CFLAGS := $(L_CFLAGS)
 LOCAL_SRC_FILES := $(OBJS)
 LOCAL_C_INCLUDES := $(INCLUDES)
+ifeq ($(DBUS), y)
+LOCAL_SHARED_LIBRARIES += libdbus
+endif
 include $(BUILD_EXECUTABLE)

 ########################
--
2.6.0.rc2.230.g3dd15c0


From samueltan at google.com  Thu Nov  5 12:05:56 2015
From: samueltan at google.com (Samuel Tan)
Date: Thu, 5 Nov 2015 12:05:56 -0800
Subject: [PATCH] Fix pointer arithmetic on a void*
Message-ID: <CABctT5diGg9eYwAYm1LY4zydv1YpA+wPyeuQmqOeDhRNRW0ZOw@mail.gmail.com>

>From fe6cca9c0d650f6c13bdccaa99351af9d1259168 Mon Sep 17 00:00:00 2001
From: Samuel Tan <samueltan at google.com>
Date: Thu, 5 Nov 2015 11:08:22 -0800
Subject: [PATCH] Fix pointer arithmetic on a void*

Fails to compile on x86 gcc due to pointer arithmetic on
a void*

Signed-off-by: Samuel Tan <samueltan at google.com>
---
 wpa_supplicant/dbus/dbus_new_handlers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c
b/wpa_supplicant/dbus/dbus_new_handlers.c
index a963e85..0504f31 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers.c
@@ -435,7 +435,7 @@ dbus_bool_t
wpas_dbus_simple_array_property_getter(DBusMessageIter *iter,

        for (i = 0; i < array_len; i++) {
                if (!dbus_message_iter_append_basic(&array_iter, type,
-                                                   array + i * element_size)) {
+                                                   (char *)array + i
* element_size)) {
                        dbus_set_error(error, DBUS_ERROR_FAILED,
                                       "%s: failed to construct message 2.5",
                                       __func__);
-- 
2.6.0.rc2.230.g3dd15c0


From dcbw at redhat.com  Thu Nov  5 12:42:06 2015
From: dcbw at redhat.com (Dan Williams)
Date: Thu, 05 Nov 2015 14:42:06 -0600
Subject: Problems connecting with wpa_supplicant
In-Reply-To: <563BAF12.5060808@riseup.net>
References: <563BAF12.5060808@riseup.net>
Message-ID: <1446756126.30515.0.camel@redhat.com>

On Thu, 2015-11-05 at 20:33 +0100, Jo wrote:
> Hi all, I've been trying to access my wifi net with wpa_supplicant in
> two cases with the same .conf file.
> 	1. With the gentoo live --> It works (wpa.good.log)
> 	2. With my just-installed gentoo machine --> It fails (wpa.bad.log)
> 
> In those logs there is also the information of lspci, dmesg | grep
> firmware and lsmod of both cases.
> 
> The lines that seems to notify the error in the bad log are the following:
> 
> nl80211: Drv Event 37 (NL80211_CMD_AUTHENTICATE) received for wlp8s0
> nl80211: MLME event 37; timeout with e4:c1:46:f3:a5:52
> wlp8s0: Event AUTH_TIMED_OUT (14) received
> wlp8s0: SME: Authentication timed out

It means that either the AP didn't reply to your request, or the card
didn't hear the APs request.  This can be either AP or kernel driver
problems.  If you try with a different device/driver combo, do oyu stil
get the same errors?

Dan



From jmm at riseup.net  Thu Nov  5 12:50:44 2015
From: jmm at riseup.net (Jo)
Date: Thu, 05 Nov 2015 21:50:44 +0100
Subject: Problems connecting with wpa_supplicant
In-Reply-To: <1446756126.30515.0.camel@redhat.com>
References: <563BAF12.5060808@riseup.net> <1446756126.30515.0.camel@redhat.com>
Message-ID: <563BC124.9010704@riseup.net>

Thanks for the quick answer.

I don't think the AP is the problem because if I load the live with the
same AP configuration it works

The firmware loaded is the same in both cases as showed by the dmesg |
grep firmware.

lspci shows that I've got a Realtek RTL8191SEvB, which I guess is the
kernel module
	Realtek RTL8192SE/RTL8191SE PCIe Wireless Network Adapter

I tried loading all the family realtek as modules but it didn't fix it.

But if wpa_supplicant does perform some activities with the card such as
scanning, doesn't that mean that the correct kernel modules of the card
are active?

Thanks

On 11/05/2015 09:42 PM, Dan Williams wrote:
> On Thu, 2015-11-05 at 20:33 +0100, Jo wrote:
>> Hi all, I've been trying to access my wifi net with wpa_supplicant in
>> two cases with the same .conf file.
>> 	1. With the gentoo live --> It works (wpa.good.log)
>> 	2. With my just-installed gentoo machine --> It fails (wpa.bad.log)
>>
>> In those logs there is also the information of lspci, dmesg | grep
>> firmware and lsmod of both cases.
>>
>> The lines that seems to notify the error in the bad log are the following:
>>
>> nl80211: Drv Event 37 (NL80211_CMD_AUTHENTICATE) received for wlp8s0
>> nl80211: MLME event 37; timeout with e4:c1:46:f3:a5:52
>> wlp8s0: Event AUTH_TIMED_OUT (14) received
>> wlp8s0: SME: Authentication timed out
> 
> It means that either the AP didn't reply to your request, or the card
> didn't hear the APs request.  This can be either AP or kernel driver
> problems.  If you try with a different device/driver combo, do oyu stil
> get the same errors?
> 
> Dan
> 
> 
> _______________________________________________
> Hostap mailing list
> Hostap at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/hostap
> 


From dcbw at redhat.com  Thu Nov  5 13:11:47 2015
From: dcbw at redhat.com (Dan Williams)
Date: Thu, 05 Nov 2015 15:11:47 -0600
Subject: Problems connecting with wpa_supplicant
In-Reply-To: <563BC124.9010704@riseup.net>
References: <563BAF12.5060808@riseup.net>
 <1446756126.30515.0.camel@redhat.com> <563BC124.9010704@riseup.net>
Message-ID: <1446757907.30515.2.camel@redhat.com>

On Thu, 2015-11-05 at 21:50 +0100, Jo wrote:
> Thanks for the quick answer.
> 
> I don't think the AP is the problem because if I load the live with the
> same AP configuration it works
> 
> The firmware loaded is the same in both cases as showed by the dmesg |
> grep firmware.
> 
> lspci shows that I've got a Realtek RTL8191SEvB, which I guess is the
> kernel module
> 	Realtek RTL8192SE/RTL8191SE PCIe Wireless Network Adapter
> 
> I tried loading all the family realtek as modules but it didn't fix it.
> 
> But if wpa_supplicant does perform some activities with the card such as
> scanning, doesn't that mean that the correct kernel modules of the card
> are active?

Yes.  But it doesn't mean that the driver for your card or the kernel's
802.11 stack are bug-free.  It's likely that the Gentoo Live thing and
the just-installed (and updated) OS have different kernel versions (and
thus different driver versions).  You could try downgrading your kernel
to the same version that is on the Live thing.

Dan

> Thanks
> 
> On 11/05/2015 09:42 PM, Dan Williams wrote:
> > On Thu, 2015-11-05 at 20:33 +0100, Jo wrote:
> >> Hi all, I've been trying to access my wifi net with wpa_supplicant in
> >> two cases with the same .conf file.
> >> 	1. With the gentoo live --> It works (wpa.good.log)
> >> 	2. With my just-installed gentoo machine --> It fails (wpa.bad.log)
> >>
> >> In those logs there is also the information of lspci, dmesg | grep
> >> firmware and lsmod of both cases.
> >>
> >> The lines that seems to notify the error in the bad log are the following:
> >>
> >> nl80211: Drv Event 37 (NL80211_CMD_AUTHENTICATE) received for wlp8s0
> >> nl80211: MLME event 37; timeout with e4:c1:46:f3:a5:52
> >> wlp8s0: Event AUTH_TIMED_OUT (14) received
> >> wlp8s0: SME: Authentication timed out
> > 
> > It means that either the AP didn't reply to your request, or the card
> > didn't hear the APs request.  This can be either AP or kernel driver
> > problems.  If you try with a different device/driver combo, do oyu stil
> > get the same errors?
> > 
> > Dan
> > 
> > 
> > _______________________________________________
> > Hostap mailing list
> > Hostap at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/hostap
> > 
> 
> _______________________________________________
> Hostap mailing list
> Hostap at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/hostap




From johncyrr at gmail.com  Fri Nov  6 09:36:33 2015
From: johncyrr at gmail.com (Johncy Bennette)
Date: Fri, 6 Nov 2015 23:06:33 +0530
Subject: dbus + wpa_supplicant 2.5 - p2p interface not working
Message-ID: <CAHOgUSnVhVi6Jbem0YDDWKm7jJ1-f2MfYn1C=7D57Z4jDkcYvg@mail.gmail.com>

Hi,
I am using dbus interface + wpa_supplicant 2.5. My WiFi interface is
working fine. With p2p interface I am facing problems. I invoke my
wpa_supplicant as
wpa_supplicant -iwlan0 -u -B -c/etc/wpa_supplicant.conf
I send the below command to query the available interfaces

dbus-send --system --print-reply --dest=fi.w1.wpa_supplicant1
/fi/w1/wpa_supplicant1 org.freedesktop.DBus.Properties.Get
string:fi.w1.wpa_supplicant1 string:Interfaces

But with this my wpa_supplicant gets killed.

With wpa_supplicant 2.1, I get the dbus-send command successfully return

dbus-send --system --print-reply --dest=fi.w1.wpa_supplicant1
/fi/w1/wpa_supplicant1 org.freedesktop.DBus.Properties.Get
string:fi.w1.wpa_supplicant1 string:Interfaces

method return sender=:1.5 -> dest=:1.11 reply_serial=2

variant array [

object path "/fi/w1/wpa_supplicant1/Interfaces/3"

object path "/fi/w1/wpa_supplicant1/Interfaces/1"

]

With wpa_supplicant 2.1 the interface for p2p is p2p0. With wpa 2.5,
the p2p-dev-wlan0 is created internally. But the GetInterface API
fails when p2p-dev-wlan0 is given as parameter for GetInterface. All
the p2p_group_add fails either. I am not sure if I am missing any
configuration?

Attached my wpa_supplicant debug log.

Regards,

Johncy.
-------------- next part --------------
wpa_supplicant v2.5-devel
random: Trying to read entropy from /dev/random
dbus: Register D-Bus object '/fi/w1/wpa_supplicant1'
Providing DBus service 'fi.w1.wpa_supplicant1'.
Providing DBus service 'fi.epitest.hostap.WPASupplicant'.
Successfully initialized wpa_supplicant
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
update_config=1
ctrl_interface='/var/run/wpa_supplicant'
eapol_version=1
ap_scan=1
fast_reauth=1
device_name='Sitara'
manufacturer='TI'
model_name='Wilink'
model_number='wl18xx'
serial_number='12345'
driver_param='use_multi_chan_concurrent=1 use_p2p_group_interface=1'
p2p_go_max_inactivity=60
p2p_go_ht40=1
p2p_ignore_shared_freq=1
disassoc_low_ack=1
config_methods='virtual_display virtual_push_button keypad'
country='US'
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=1 op=0 soft=0 hard=0
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Supported cipher 00-14-72:1
nl80211: Supports Probe Response offload in AP mode
nl80211: Using driver-based off-channel TX
nl80211: Supported vendor command: vendor_id=0x80028 subcmd=0
nl80211: Supported vendor command: vendor_id=0x80028 subcmd=1
nl80211: Supported vendor command: vendor_id=0x80028 subcmd=2
nl80211: Supported vendor event: vendor_id=0x80028 subcmd=0
nl80211: Supported vendor event: vendor_id=0x80028 subcmd=1
nl80211: Use separate P2P group interface (driver advertised support)
nl80211: Enable multi-channel concurrent (driver advertised support)
nl80211: use P2P_DEVICE support
nl80211: interface wlan0 in phy phy0
nl80211: Set mode ifindex 6 iftype 2 (STATION)
nl80211: Subscribe to mgmt frames with non-AP handle 0x16e5c30
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16e5c30 match=0104
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16e5c30 match=040a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16e5c30 match=040b
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16e5c30 match=040c
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16e5c30 match=040d
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16e5c30 match=090a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16e5c30 match=090b
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16e5c30 match=090c
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16e5c30 match=090d
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16e5c30 match=0409506f9a09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16e5c30 match=7f506f9a09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16e5c30 match=0801
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16e5c30 match=06
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16e5c30 match=0a07
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16e5c30 match=0a11
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16e5c30 match=0a1a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16e5c30 match=1101
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16e5c30 match=1102
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16e5c30 match=0505
netlink: Operstate: ifindex=6 linkmode=1 (userspace-control), operstate=5 (IF_OPER_DORMANT)
nl80211: driver param='use_multi_chan_concurrent=1 use_p2p_group_interface=1'
nl80211: Use separate P2P group interface
Add interface wlan0 to a new radio phy0
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz 20 mBm
nl80211: 2457-2482 @ 40 MHz 20 mBm (no IR)
nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)
nl80211: 5170-5250 @ 160 MHz 20 mBm (no IR)
nl80211: 5250-5330 @ 160 MHz 20 mBm (DFS) (no IR)
nl80211: 5490-5730 @ 160 MHz 20 mBm (DFS) (no IR)
nl80211: 5735-5835 @ 80 MHz 20 mBm (no IR)
nl80211: 57240-63720 @ 2160 MHz 0 mBm
nl80211: Added 802.11b mode based on 802.11g information
wlan0: Own MAC address: 78:a5:04:22:67:1a
wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=(nil) key_idx=4 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=6 (wlan0) alg=0 addr=(nil) key_idx=5 set_tx=0 seq_len=0 key_len=0
wlan0: RSN: flushing PMKID list in the driver
nl80211: Flush PMKIDs
wlan0: State: DISCONNECTED -> INACTIVE
TDLS: TDLS operation not supported by driver
TDLS: Driver uses internal link setup
TDLS: Driver does not support TDLS channel switching
wlan0: WPS: UUID based on MAC address: 16e85e21-2a9f-5cd9-9844-56876bd67897
ENGINE: Loading dynamic engine
ENGINE: Loading dynamic engine
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
nl80211: Skip set_supp_port(unauthorized) while not associated
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
Using existing control interface directory.
ctrl_iface bind(PF_UNIX) failed: Address already in use
ctrl_iface exists, but does not allow connections - assuming it was leftover from forced program termination
Successfully replaced leftover ctrl_iface socket '/var/run/wpa_supplicant/wlan0'
dbus: Register interface object '/fi/w1/wpa_supplicant1/Interfaces/1'
wlan0: Added interface wlan0
wlan0: State: INACTIVE -> DISCONNECTED
nl80211: Set wlan0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=6 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
nl80211: Create interface iftype 10 (P2P_DEVICE)
nl80211: New P2P Device interface p2p-dev-wlan0 (0x3) created
Initializing interface 'p2p-dev-wlan0' conf '/etc/wpa_supplicant.conf' driver 'nl80211' ctrl_interface '/var/run/wpa_supplicant' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
update_config=1
ctrl_interface='/var/run/wpa_supplicant'
eapol_version=1
ap_scan=1
fast_reauth=1
device_name='Sitara'
manufacturer='TI'
model_name='Wilink'
model_number='wl18xx'
serial_number='12345'
driver_param='use_multi_chan_concurrent=1 use_p2p_group_interface=1'
p2p_go_max_inactivity=60
p2p_go_ht40=1
p2p_ignore_shared_freq=1
disassoc_low_ack=1
config_methods='virtual_display virtual_push_button keypad'
country='US'
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=1 op=0 soft=0 hard=0
Could not read interface p2p-dev-wlan0 flags: No such device
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Supported cipher 00-14-72:1
nl80211: Supports Probe Response offload in AP mode
nl80211: Using driver-based off-channel TX
nl80211: Supported vendor command: vendor_id=0x80028 subcmd=0
nl80211: Supported vendor command: vendor_id=0x80028 subcmd=1
nl80211: Supported vendor command: vendor_id=0x80028 subcmd=2
nl80211: Supported vendor event: vendor_id=0x80028 subcmd=0
nl80211: Supported vendor event: vendor_id=0x80028 subcmd=1
nl80211: Use separate P2P group interface (driver advertised support)
nl80211: Enable multi-channel concurrent (driver advertised support)
nl80211: use P2P_DEVICE support
nl80211: interface p2p-dev-wlan0 in phy phy0
nl80211: Set mode ifindex 0 iftype 10 (P2P_DEVICE)
nl80211: Failed to set interface 0 to mode 10: -22 (Invalid argument)
nl80211: Subscribe to mgmt frames with non-AP handle 0x16f7220
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16f7220 match=0104
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16f7220 match=040a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16f7220 match=040b
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16f7220 match=040c
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16f7220 match=040d
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16f7220 match=090a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16f7220 match=090b
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16f7220 match=090c
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16f7220 match=090d
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16f7220 match=0409506f9a09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16f7220 match=7f506f9a09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16f7220 match=0801
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16f7220 match=06
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16f7220 match=0a07
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16f7220 match=0a11
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16f7220 match=0a1a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16f7220 match=1101
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16f7220 match=1102
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x16f7220 match=0505
nl80211: Start P2P Device p2p-dev-wlan0 (0x3): Success
nl80211: driver param='use_multi_chan_concurrent=1 use_p2p_group_interface=1'
nl80211: Use separate P2P group interface
Add interface p2p-dev-wlan0 to existing radio phy0
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz 20 mBm
nl80211: 2457-2482 @ 40 MHz 20 mBm (no IR)
nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)
nl80211: 5170-5250 @ 160 MHz 20 mBm (no IR)
nl80211: 5250-5330 @ 160 MHz 20 mBm (DFS) (no IR)
nl80211: 5490-5730 @ 160 MHz 20 mBm (DFS) (no IR)
nl80211: 5735-5835 @ 80 MHz 20 mBm (no IR)
nl80211: 57240-63720 @ 2160 MHz 0 mBm
nl80211: Added 802.11b mode based on 802.11g information
p2p-dev-wlan0: Own MAC address: 78:a5:04:22:67:1b
p2p-dev-wlan0: RSN: flushing PMKID list in the driver
nl80211: Flush PMKIDs
p2p-dev-wlan0: State: DISCONNECTED -> INACTIVE
p2p-dev-wlan0: WPS: UUID from the first interface: 16e85e21-2a9f-5cd9-9844-56876bd67897
ENGINE: Loading dynamic engine
ENGINE: Loading dynamic engine
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
nl80211: Skip set_supp_port(unauthorized) while not associated
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
Using existing control interface directory.
ctrl_iface bind(PF_UNIX) failed: Address already in use
ctrl_iface exists, but does not allow connections - assuming it was leftover from forced program termination
Successfully replaced leftover ctrl_iface socket '/var/run/wpa_supplicant/p2p-dev-wlan0'
P2P: Add operating class 81
P2P: Channels - hexdump(len=11): 01 02 03 04 05 06 07 08 09 0a 0b
P2P: Own listen channel: 81:1
P2P: Random operating channel: 81:11
P2P: initialized
P2P: channels: 81:1,2,3,4,5,6,7,8,9,10,11
P2P: cli_channels:
p2p-dev-wlan0: Added interface p2p-dev-wlan0
p2p-dev-wlan0: State: INACTIVE -> DISCONNECTED
nl80211: Set p2p-dev-wlan0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=0 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
Daemonize..

From dcbw at redhat.com  Fri Nov  6 10:07:24 2015
From: dcbw at redhat.com (Dan Williams)
Date: Fri, 06 Nov 2015 12:07:24 -0600
Subject: dbus + wpa_supplicant 2.5 - p2p interface not working
In-Reply-To: <CAHOgUSnVhVi6Jbem0YDDWKm7jJ1-f2MfYn1C=7D57Z4jDkcYvg@mail.gmail.com>
References: <CAHOgUSnVhVi6Jbem0YDDWKm7jJ1-f2MfYn1C=7D57Z4jDkcYvg@mail.gmail.com>
Message-ID: <1446833244.10453.5.camel@redhat.com>

On Fri, 2015-11-06 at 23:06 +0530, Johncy Bennette wrote:
> Hi,
> I am using dbus interface + wpa_supplicant 2.5. My WiFi interface is
> working fine. With p2p interface I am facing problems. I invoke my
> wpa_supplicant as
> wpa_supplicant -iwlan0 -u -B -c/etc/wpa_supplicant.conf
> I send the below command to query the available interfaces
> 
> dbus-send --system --print-reply --dest=fi.w1.wpa_supplicant1
> /fi/w1/wpa_supplicant1 org.freedesktop.DBus.Properties.Get
> string:fi.w1.wpa_supplicant1 string:Interfaces
> 
> But with this my wpa_supplicant gets killed.

This indicates that there is a bug in wpa_supplicant 2.5.  Can you run
the supplicant under 'gdb' and get a backtrace when it dies in gdb?

Dan

> With wpa_supplicant 2.1, I get the dbus-send command successfully return
> 
> dbus-send --system --print-reply --dest=fi.w1.wpa_supplicant1
> /fi/w1/wpa_supplicant1 org.freedesktop.DBus.Properties.Get
> string:fi.w1.wpa_supplicant1 string:Interfaces
> 
> method return sender=:1.5 -> dest=:1.11 reply_serial=2
> 
> variant array [
> 
> object path "/fi/w1/wpa_supplicant1/Interfaces/3"
> 
> object path "/fi/w1/wpa_supplicant1/Interfaces/1"
> 
> ]
> 
> With wpa_supplicant 2.1 the interface for p2p is p2p0. With wpa 2.5,
> the p2p-dev-wlan0 is created internally. But the GetInterface API
> fails when p2p-dev-wlan0 is given as parameter for GetInterface. All
> the p2p_group_add fails either. I am not sure if I am missing any
> configuration?
> 
> Attached my wpa_supplicant debug log.
> 
> Regards,
> 
> Johncy.
> _______________________________________________
> Hostap mailing list
> Hostap at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/hostap




From greearb at candelatech.com  Fri Nov  6 10:51:13 2015
From: greearb at candelatech.com (Ben Greear)
Date: Fri, 6 Nov 2015 10:51:13 -0800
Subject: Should AP advertise as HT20/40 if it can only run HT20?
Message-ID: <563CF6A1.7020005@candelatech.com>

We configured an AP to run on channel 6, HT40+.

But, due to scan results, it decided it could only run HT20 due to
overlapping BSS.

The scan results show it as having HT20/40 capability but
no secondary channel.

Is this expected?  I was thinking it might should not be advertising
the HT40.  We are running local patches, possibly we messed up something.

Thanks,
Ben



BSS 04:f0:21:7d:cc:36(on sta13) -- associated
     TSF: 0 usec (0d, 00:00:00)
     freq: 2437
     beacon interval: 240 TUs
     capability: ESS ShortSlotTime (0x0401)
     signal: -18.00 dBm
     last seen: 1 ms ago
     Information elements from Probe Response frame:
     SSID: brenttest-10k
     Supported rates: 1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0
     DS Parameter set: channel 6
     ERP: Barker_Preamble_Mode
     Extended supported rates: 24.0 36.0 48.0 54.0
     HT capabilities:
         Capabilities: 0x6e
             HT20/HT40
             SM Power Save disabled
             RX HT20 SGI
             RX HT40 SGI
             No RX STBC
             Max AMSDU length: 3839 bytes
             No DSSS/CCK HT40
         Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
         Minimum RX AMPDU time spacing: 8 usec (0x06)
         HT TX/RX MCS rate indexes supported: 0-23
     HT operation:
          * primary channel: 6
          * secondary channel offset: no secondary
          * STA channel width: 20 MHz
          * RIFS: 0
          * HT protection: no
          * non-GF present: 1
          * OBSS non-GF present: 0
          * dual beacon: 0
          * dual CTS protection: 0
          * STBC beacon: 0
          * L-SIG TXOP Prot: 0
          * PCO active: 0
          * PCO phase: 0
     Extended capabilities: SSID List, 6
     WMM:     * Parameter version 1
          * BE: CW 15-1023, AIFSN 3
          * BK: CW 15-1023, AIFSN 7
          * VI: CW 7-15, AIFSN 2, TXOP 3008 usec
          * VO: CW 3-7, AIFSN 2, TXOP 1504 usec
-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



From johannes at sipsolutions.net  Fri Nov  6 11:24:14 2015
From: johannes at sipsolutions.net (Johannes Berg)
Date: Fri, 06 Nov 2015 20:24:14 +0100
Subject: Should AP advertise as HT20/40 if it can only run HT20?
In-Reply-To: <563CF6A1.7020005@candelatech.com>
References: <563CF6A1.7020005@candelatech.com>
Message-ID: <1446837854.25532.6.camel@sipsolutions.net>

On Fri, 2015-11-06 at 10:51 -0800, Ben Greear wrote:
> We configured an AP to run on channel 6, HT40+.
> 
> But, due to scan results, it decided it could only run HT20 due to
> overlapping BSS.
> 
> The scan results show it as having HT20/40 capability but
> no secondary channel.
> 
> Is this expected???I was thinking it might should not be advertising
> the HT40.??We are running local patches, possibly we messed up
> something.
> 
No, this is correct and expected. The capability and the actual
operation need not match. In theory, the AP could re-determine later
whether or not it's allowed to operate as HT20 (say the overlapping BSS
goes away) and dynamically reconfigure the *operation* on the fly - it
cannot change its capabilities.

johannes


From johncyrr at gmail.com  Sat Nov  7 02:41:58 2015
From: johncyrr at gmail.com (Johncy Bennette)
Date: Sat, 7 Nov 2015 16:11:58 +0530
Subject: dbus + wpa_supplicant 2.5 - p2p interface not working
In-Reply-To: <1446833244.10453.5.camel@redhat.com>
References: <CAHOgUSnVhVi6Jbem0YDDWKm7jJ1-f2MfYn1C=7D57Z4jDkcYvg@mail.gmail.com>
 <1446833244.10453.5.camel@redhat.com>
Message-ID: <CAHOgUSnGM-hF9CPmzN4w-3hwQR2NgwfFVOrO2KrCHAgRVWqB4Q@mail.gmail.com>

Thanks Dan. I will run with gdb once I am back to office.

>From the wpa_supplicant debug message for wlan0 I could see,
----------------------------------------------------------------------------------------------
Successfully replaced leftover ctrl_iface socket '/var/run/wpa_supplicant/wlan0'

dbus: Register interface object '/fi/w1/wpa_supplicant1/Interfaces/1'

wlan0: Added interface wlan0

wlan0: State: INACTIVE -> DISCONNECTED

nl80211: Set wlan0 operstate 0->0 (DORMANT)


But for p2p-dev-wlan0, I couldn?t see any register with dbus object.
Not sure if this could be the problem?
-----------------------------------------------------------------------------------------------------
Successfully replaced leftover ctrl_iface socket
'/var/run/wpa_supplicant/p2p-dev-wlan0'

P2P: Add operating class 81

P2P: Channels - hexdump(len=11): 01 02 03 04 05 06 07 08 09 0a 0b

P2P: Own listen channel: 81:1

P2P: Random operating channel: 81:11

P2P: initialized

P2P: channels: 81:1,2,3,4,5,6,7,8,9,10,11

P2P: cli_channels:

p2p-dev-wlan0: Added interface p2p-dev-wlan0

p2p-dev-wlan0: State: INACTIVE -> DISCONNECTED

nl80211: Set p2p-dev-wlan0 operstate 0->0 (DORMANT)

netlink: Operstate: ifindex=0 linkmode=-1 (no change), operstate=5
(IF_OPER_DORMANT)


Code from notify.c in wpa_supplicant,

int wpas_notify_iface_added(struct wpa_supplicant *wpa_s)
{
if (wpa_s->p2p_mgmt)
return 0;

if (wpas_dbus_register_iface(wpa_s))
return -1;

if (wpas_dbus_register_interface(wpa_s))
return -1;

return 0;
}

Whats the p2p_mgmt is for?

Regards,
Johncy.

On 6 November 2015 at 23:37, Dan Williams <dcbw at redhat.com> wrote:
> On Fri, 2015-11-06 at 23:06 +0530, Johncy Bennette wrote:
>> Hi,
>> I am using dbus interface + wpa_supplicant 2.5. My WiFi interface is
>> working fine. With p2p interface I am facing problems. I invoke my
>> wpa_supplicant as
>> wpa_supplicant -iwlan0 -u -B -c/etc/wpa_supplicant.conf
>> I send the below command to query the available interfaces
>>
>> dbus-send --system --print-reply --dest=fi.w1.wpa_supplicant1
>> /fi/w1/wpa_supplicant1 org.freedesktop.DBus.Properties.Get
>> string:fi.w1.wpa_supplicant1 string:Interfaces
>>
>> But with this my wpa_supplicant gets killed.
>
> This indicates that there is a bug in wpa_supplicant 2.5.  Can you run
> the supplicant under 'gdb' and get a backtrace when it dies in gdb?
>
> Dan
>
>> With wpa_supplicant 2.1, I get the dbus-send command successfully return
>>
>> dbus-send --system --print-reply --dest=fi.w1.wpa_supplicant1
>> /fi/w1/wpa_supplicant1 org.freedesktop.DBus.Properties.Get
>> string:fi.w1.wpa_supplicant1 string:Interfaces
>>
>> method return sender=:1.5 -> dest=:1.11 reply_serial=2
>>
>> variant array [
>>
>> object path "/fi/w1/wpa_supplicant1/Interfaces/3"
>>
>> object path "/fi/w1/wpa_supplicant1/Interfaces/1"
>>
>> ]
>>
>> With wpa_supplicant 2.1 the interface for p2p is p2p0. With wpa 2.5,
>> the p2p-dev-wlan0 is created internally. But the GetInterface API
>> fails when p2p-dev-wlan0 is given as parameter for GetInterface. All
>> the p2p_group_add fails either. I am not sure if I am missing any
>> configuration?
>>
>> Attached my wpa_supplicant debug log.
>>
>> Regards,
>>
>> Johncy.
>> _______________________________________________
>> Hostap mailing list
>> Hostap at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/hostap
>
>


From benoitne at gmail.com  Sat Nov  7 17:00:44 2015
From: benoitne at gmail.com (=?UTF-8?Q?Beno=c3=aet?=)
Date: Sun, 8 Nov 2015 02:00:44 +0100
Subject: openvswitch & hostapd compatibility improved?
In-Reply-To: <563E9E47.4070607@gmail.com>
References: <563E9E47.4070607@gmail.com>
Message-ID: <563E9EBC.1020308@gmail.com>

Hi

Just want to double check that something has changed on the 
compatibility with openvswitch?
In fact in the past I needed to use a patch to help ioctl but when I 
tested today with the last version it is like I don't need anymore.
Just to double check if it has been changed

many thanks

belette



From benoitne at gmail.com  Sat Nov  7 17:17:39 2015
From: benoitne at gmail.com (=?UTF-8?Q?Beno=c3=aet?=)
Date: Sun, 8 Nov 2015 02:17:39 +0100
Subject: openvswitch & hostapd compatibility improved?
In-Reply-To: <563EA281.50801@gmail.com>
References: <563E9E47.4070607@gmail.com> <563EA281.50801@gmail.com>
Message-ID: <563EA2B3.1000306@gmail.com>

https://w1.fi/cgit/hostap/commit/?id=cb05808c46539922cf02e9e8527a062e90637ff9

I guess?
>
> On 08/11/15 01:58, Beno?t wrote:
>> Hi
>>
>> Just want to double check that something has changed on the 
>> compatibility with openvswitch?
>> In fact in the past I needed to use a patch to help ioctl but when I 
>> tested today with the last version it is like I don't need anymore.
>> Just to double check if it has been changed
>>
>> many thanks
>>
>> belette 
>



From norbert.wegener at atos.net  Mon Nov  9 02:24:16 2015
From: norbert.wegener at atos.net (Wegener, Norbert)
Date: Mon, 9 Nov 2015 10:24:16 +0000
Subject: Vendor-specific attributes
Message-ID: <D4FF869F9112FC479505FCD95E9B6A1954AA0128@DEFTHW99EZ4MSX.ww931.my-it-solutions.net>

Years ago there was a thread about eapol_test and vendor specific attributes:
http://lists.shmoo.com/pipermail/hostap/2009-January/019132.html
As this topic comes back to me theses days and I did not find any information about that:
Has this patch been integrated? How would I pass an attribute from 
freeradius' dictionary.siemens (e.g. Siemens-SSID) to eapol_test?


Norbert Wegener

From edward.cragg at codethink.co.uk  Tue Nov 10 02:25:29 2015
From: edward.cragg at codethink.co.uk (Edward Cragg)
Date: Tue, 10 Nov 2015 10:25:29 +0000
Subject: Automatic channel selection
Message-ID: <20151110102529.GA30582@codethink.co.uk>

Hi,

I've seen the implementation of automatic channel selection (ACS) in hostapd.

My problem is, that i need to implement ACS, in an application which uses
wpa_supplicant, but not hostapd.

I'd really like to find out whether it would be appropriate at all to try to
implement ACS within wpa_supplicant.

I would be undertaking to implement this ACS algorithm, and wondered whether
this would be likely to be something upstream is interested in.

Thanks,

Ed


From alex.epert at gmail.com  Tue Nov 10 07:14:06 2015
From: alex.epert at gmail.com (Alexandre Epert)
Date: Tue, 10 Nov 2015 16:14:06 +0100
Subject: 2 SSIDs on 1 interface
Message-ID: <CAB0c3LXHnF3ezd3reY1-RW=b_1k-BMJkS3H9kWGLgorYo86j7Q@mail.gmail.com>

Hi,

I'm quite new to hostapd but I need to have 2 SSIDs on 1 physical
interface but I can't make it work.

I read that guide
http://wiki.stocksy.co.uk/wiki/Multiple_SSIDs_with_hostapd and
hostapd.conf file.
It is said I need to change MAC address of my wireless interface to
match the beginning of the MAC addresses defined by this mask
ff:ff:ff:ff:ff:fc (if I understood/read correctly).

I can not change MAC address of my interface, maybe due to a driver
limitation or issue. I tried using system tools (ifconfig,
/etc/network/interfaces, etc.) and macchanger which gives me an error
message : Network driver didn't actually change to the new MAC!!
I am using an Edimax EW-7811U AC USB Wifi dongle with a driver from
github : https://github.com/abperiasamy/rtl8812AU_8821AU_linux

Is there a way to have 2 SSIDs on 1 interface without modifying MAC address?


It's working with 1 SSID quite well (not stress tested at the moment).

Any help would be gladly appreciated.

Thanks.


From j at w1.fi  Tue Nov 10 09:37:26 2015
From: j at w1.fi (Jouni Malinen)
Date: Tue, 10 Nov 2015 19:37:26 +0200
Subject: wpa_supplicant unauthorized WNM Sleep Mode GTK control
Message-ID: <20151110173726.GA7002@w1.fi>

wpa_supplicant unauthorized WNM Sleep Mode GTK control

Published: November 10, 2015
Identifier: CVE-2015-5310
Latest version available from: http://w1.fi/security/2015-6/


Vulnerability

A vulnerability in wpa_supplicant was found in WMM Sleep Mode Response
frame processing in a case where the association uses RSN (WPA2-Personal
or WPA2-Enterprise), but does not use management frame protection (MFP,
also known as PMF = protected management frames). This WNM Sleep Mode
mechanism was not designed to be used without management frame
protection, but there was no explicit check for that in wpa_supplicant.

wpa_supplicant accepted the updated GTK keys from this frame regardless
of whether management frame protection was negotiated for the
association. This may result in an unauthenticated, injected frame being
able to replace the GTK (the key used to protected broadcast and
multicast Data frames).

This vulnerability can be used to perform broadcast/multicast packet
injection and denial of service (prevent authorized broadcast/multicast
packets from being accepted) attacks by an attacker that is within radio
range of the station devices.


Vulnerable versions/configurations

wpa_supplicant v2.0-v2.5 with CONFIG_WNM=y the build configuration
(wpa_supplicant/.config) and a driver that sends WNM Action frames to
user space for processing. For example, most cfg80211/mac80211-based
drivers do this. However, some drivers do not seem to send the WNM Sleep
Mode Response frame to user space even though they are reporting some
other WNM Action frames. When wpa_supplicant is used with such a driver,
it may not be possible to trigger this vulnerability.


Possible mitigation steps

- Merge the following commit and rebuild hostapd/wpa_supplicant:

  WNM: Ignore Key Data in WNM Sleep Mode Response frame if no PMF in use

  This patch is available from http://w1.fi/security/2015-6/
  (two different versions; one matching the exact hostap.git and another
  one for older snapshot prior to the unrelated changes in the file; the
  latter can be used to fix older wpa_supplicant versions).

- Update to wpa_supplicant v2.6 or newer, once available.

- Enable management frame protection in the AP and station configuration
  ("ieee80211w=2" in wpa_supplicant network profile).

- wpa_supplicant: Disable CONFIG_WNM=y in the build configuration
  (wpa_supplicant/.config) (i.e., remove the line or comment it out);
  note: this will disable all WNM functionality, so this mitigation option
  may not be appropriate for number of use cases.

-- 
Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Tue Nov 10 09:38:36 2015
From: j at w1.fi (Jouni Malinen)
Date: Tue, 10 Nov 2015 19:38:36 +0200
Subject: EAP-pwd missing last fragment length validation
Message-ID: <20151110173836.GB7002@w1.fi>

EAP-pwd missing last fragment length validation

Published: November 10, 2015
Identifier: CVE-2015-5314 (hostapd), CVE-2015-5315 (wpa_supplicant)
Latest version available from: http://w1.fi/security/2015-7/


Vulnerability

A vulnerability was found in EAP-pwd server and peer implementation used
in hostapd and wpa_supplicant, respectively. When an incoming EAP-pwd
message is fragmented, the remaining reassembly buffer length was not
checked for the last fragment (but was checked for other
fragments). This allowed a suitably constructed last fragment frame to
try to add extra data that would go beyond the buffer. The length
validation code in wpabuf_put_data() prevents an actual buffer write
overflow from occurring, but this results in process termination.

For hostapd used with an internal EAP server and EAP-pwd enabled in the
runtime configuration, this could allow a denial of service attack by an
attacker within radio range of the AP device.

For hostapd used as a RADIUS server with EAP-pwd enabled in the runtime
configuration, this could allow a denial of service attack by an
attacker within radio range of any AP device that is authorized to use
the RADIUS server.

For wpa_supplicant with EAP-pwd enabled in a network configuration
profile, this could allow a denial of service attack by an attacker
within radio range.


Vulnerable versions/configurations

hostapd v2.0-v2.5 with CONFIG_EAP_PWD=y in the build configuration
(hostapd/.config) and EAP-pwd authentication server enabled in runtime
configuration.

wpa_supplicant v2.0-v2.5 with CONFIG_EAP_PWD=y in the build
configuration (wpa_supplicant/.config) and EAP-pwd enabled in a network
profile at runtime.


Possible mitigation steps

- Merge the following commits and rebuild hostapd/wpa_supplicant:

  EAP-pwd peer: Fix last fragment length validation
  EAP-pwd server: Fix last fragment length validation

  These patches are available from http://w1.fi/security/2015-7/

- Update to hostapd/wpa_supplicant v2.6 or newer, once available

- Remove CONFIG_EAP_PWD=y from build configuration

- Disable EAP-pwd in runtime configuration

-- 
Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Tue Nov 10 09:39:29 2015
From: j at w1.fi (Jouni Malinen)
Date: Tue, 10 Nov 2015 19:39:29 +0200
Subject: EAP-pwd peer error path failure on unexpected Confirm message
Message-ID: <20151110173929.GC7002@w1.fi>

EAP-pwd peer error path failure on unexpected Confirm message

Published: November 10, 2015
Identifier: CVE-2015-5316
Latest version available from: http://w1.fi/security/2015-8/


Vulnerability

A vulnerability was found in EAP-pwd peer implementation used in
wpa_supplicant. If an EAP-pwd Confirm message is received unexpectedly
before the Identity exchange, the error path processing ended up
dereferencing a NULL pointer and terminating the process.

For wpa_supplicant with EAP-pwd enabled in a network configuration
profile, this could allow a denial of service attack by an attacker
within radio range.


Vulnerable versions/configurations

wpa_supplicant v2.3-v2.5 with CONFIG_EAP_PWD=y in the build
configuration (wpa_supplicant/.config) and EAP-pwd enabled in a network
profile at runtime.


Possible mitigation steps

- Merge the following commits and rebuild wpa_supplicant:

  EAP-pwd peer: Fix error path for unexpected Confirm message

  This patch is available from http://w1.fi/security/2015-8/

- Update to wpa_supplicant v2.6 or newer, once available

- Remove CONFIG_EAP_PWD=y from build configuration

- Disable EAP-pwd in runtime configuration

-- 
Jouni Malinen                                            PGP id EFC895FA


From bordjukov at gmail.com  Tue Nov 10 10:17:13 2015
From: bordjukov at gmail.com (Petko Bordjukov)
Date: Tue, 10 Nov 2015 20:17:13 +0200
Subject: [PATCH 1/2] IAPP: Set SO_REUSEPORT on listening socket
Message-ID: <1447179434-18596-1-git-send-email-bordjukov@gmail.com>

Make it possible for several instances of hostapd to listen on the same
network interface.

Signed-off-by: Petko Bordjukov <bordjukov at gmail.com>
---
 src/ap/iapp.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/ap/iapp.c b/src/ap/iapp.c
index 99aa04d..61776d8 100644
--- a/src/ap/iapp.c
+++ b/src/ap/iapp.c
@@ -385,6 +385,7 @@ struct iapp_data * iapp_init(struct hostapd_data *hapd, const char *iface)
 	struct sockaddr_in *paddr, uaddr;
 	struct iapp_data *iapp;
 	struct ip_mreqn mreq;
+	int reuseport = 1;
 
 	iapp = os_zalloc(sizeof(*iapp));
 	if (iapp == NULL)
@@ -447,6 +448,15 @@ struct iapp_data * iapp_init(struct hostapd_data *hapd, const char *iface)
 	os_memset(&uaddr, 0, sizeof(uaddr));
 	uaddr.sin_family = AF_INET;
 	uaddr.sin_port = htons(IAPP_UDP_PORT);
+
+	if (setsockopt(iapp->udp_sock, SOL_SOCKET, SO_REUSEPORT, &reuseport,
+		       sizeof(reuseport)) < 0) {
+		wpa_printf(MSG_INFO, "iapp_init - setsockopt[UDP,SO_REUSEPORT]: %s",
+			   strerror(errno));
+		iapp_deinit(iapp);
+		return NULL;
+	}
+
 	if (bind(iapp->udp_sock, (struct sockaddr *) &uaddr,
 		 sizeof(uaddr)) < 0) {
 		wpa_printf(MSG_INFO, "iapp_init - bind[UDP]: %s",
-- 
2.6.2



From bordjukov at gmail.com  Tue Nov 10 10:17:14 2015
From: bordjukov at gmail.com (Petko Bordjukov)
Date: Tue, 10 Nov 2015 20:17:14 +0200
Subject: [PATCH 2/2] IAPP: Set IP_MULTICAST_LOOP on listening socket
In-Reply-To: <1447179434-18596-1-git-send-email-bordjukov@gmail.com>
References: <1447179434-18596-1-git-send-email-bordjukov@gmail.com>
Message-ID: <1447179434-18596-2-git-send-email-bordjukov@gmail.com>

Make it possible for hostapd instances listening on the same IP to see
eachother's messages.

Signed-off-by: Petko Bordjukov <bordjukov at gmail.com>
---
 src/ap/iapp.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/ap/iapp.c b/src/ap/iapp.c
index 61776d8..a568b03 100644
--- a/src/ap/iapp.c
+++ b/src/ap/iapp.c
@@ -386,6 +386,7 @@ struct iapp_data * iapp_init(struct hostapd_data *hapd, const char *iface)
 	struct iapp_data *iapp;
 	struct ip_mreqn mreq;
 	int reuseport = 1;
+	int multicast_loop = 1;
 
 	iapp = os_zalloc(sizeof(*iapp));
 	if (iapp == NULL)
@@ -477,6 +478,14 @@ struct iapp_data * iapp_init(struct hostapd_data *hapd, const char *iface)
 		return NULL;
 	}
 
+	if (setsockopt(iapp->udp_sock, IPPROTO_IP, IP_MULTICAST_LOOP, &multicast_loop,
+		       sizeof(multicast_loop)) < 0) {
+		wpa_printf(MSG_INFO, "iapp_init - setsockopt[UDP,IP_MULTICAST_LOOP]: %s",
+			   strerror(errno));
+		iapp_deinit(iapp);
+		return NULL;
+	}
+
 	iapp->packet_sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
 	if (iapp->packet_sock < 0) {
 		wpa_printf(MSG_INFO, "iapp_init - socket[PF_PACKET,SOCK_RAW]: %s",
-- 
2.6.2



From michael-dev at fami-braun.de  Tue Nov 10 13:43:32 2015
From: michael-dev at fami-braun.de (M. Braun)
Date: Tue, 10 Nov 2015 22:43:32 +0100
Subject: [PATCH 2/2] IAPP: Set IP_MULTICAST_LOOP on listening socket
In-Reply-To: <1447179434-18596-2-git-send-email-bordjukov@gmail.com>
References: <1447179434-18596-1-git-send-email-bordjukov@gmail.com>
 <1447179434-18596-2-git-send-email-bordjukov@gmail.com>
Message-ID: <56426504.7020107@fami-braun.de>

Am 10.11.2015 um 19:17 schrieb Petko Bordjukov:
> Make it possible for hostapd instances listening on the same IP to see
> eachother's messages.

Isn't IP_MULTICAST_LOOP enabled by default?

Regards,
 M. Braun



From bordjukov at gmail.com  Wed Nov 11 02:39:40 2015
From: bordjukov at gmail.com (Petko Bordjukov)
Date: Wed, 11 Nov 2015 12:39:40 +0200
Subject: [PATCH 2/2] IAPP: Set IP_MULTICAST_LOOP on listening socket
In-Reply-To: <56426504.7020107@fami-braun.de>
References: <1447179434-18596-1-git-send-email-bordjukov@gmail.com>
 <1447179434-18596-2-git-send-email-bordjukov@gmail.com>
 <56426504.7020107@fami-braun.de>
Message-ID: <1447238380.25996.2.camel@gmail.com>

Yes, it is. Patch 2/2 is unnecessary.


On ??, 2015-11-10 at 22:43 +0100, M. Braun wrote:
> Am 10.11.2015 um 19:17 schrieb Petko Bordjukov:
> > Make it possible for hostapd instances listening on the same IP to
> > see
> > eachother's messages.
> 
> Isn't IP_MULTICAST_LOOP enabled by default?
> 
> Regards,
> ?M. Braun
> 


From maitalm at ti.com  Wed Nov 11 07:06:06 2015
From: maitalm at ti.com (Hahn, Maital)
Date: Wed, 11 Nov 2015 15:06:06 +0000
Subject: Encryption of Management frames
Message-ID: <EC18CD4F248FCC49B53632D772F729D626413060@DFRE01.ent.ti.com>

Hi,

I'm trying to find how management frames (Action frames, to be more specific) 
are marked for encryption in the Hostap code, and was hoping you can help me.

I found some reference to this subject in the RX path (under CONFIG_IEEE80211W), but none in the TX path.
Is it supported?


Thanks,
Maital



From rmanohar at qti.qualcomm.com  Thu Nov 12 03:04:11 2015
From: rmanohar at qti.qualcomm.com (Rajkumar Manoharan)
Date: Thu, 12 Nov 2015 16:34:11 +0530
Subject: [PATCH RESEND] hostapd: add VHT tx power envelope IE
In-Reply-To: <20151028210005.GB12388@w1.fi>
References: <1445604734-14654-1-git-send-email-rmanohar@qti.qualcomm.com>
 <20151028210005.GB12388@w1.fi>
Message-ID: <20151112110407.GA27719@rmanohar-arch.qca.qualcomm.com>

On Wed, Oct 28, 2015 at 11:00:05PM +0200, Jouni Malinen wrote:
> On Fri, Oct 23, 2015 at 06:22:14PM +0530, Rajkumar Manoharan wrote:
> > Add VHT transmit power envelope element defined in IEEE std
> > 802.11ac-2013 8.4.2.164 for VHT bandwidth channel switch.
>
> Please note that this has been renamed to "Transmit Power Envelope
> element" in REVmc (i.e., "VHT" removed from the name).
>
Will remove VHT in next version. Should I keep the spec. section as it
is?

[...]
> > +	/*
> > +	 * Local Maximum Transmit power is encoded as 2's complement
> > +	 * with a 0.5 dB step
> > +	 */
> > +	max_tx_power = ~(chan->max_tx_power * 2) + 1;
> > +	*eid++ = max_tx_power;
> > +	*eid++ = max_tx_power;
> > +	*eid++ = max_tx_power;
> 
> Could you please clarify why all three values are set to the same value?
> Would there be no case where the local maximum transmit power is
> different for 20, 40, and 80 MHz channel cases?
>
Since I do not find per bandwidth max tx power, I used the channel max
tx power for all bandwith. Is there a way to extract per-bw max tx power from
regulatory. Please help.

Will address your other comments in next version.

-Rajkumar


From johncyrr at gmail.com  Fri Nov 13 01:40:25 2015
From: johncyrr at gmail.com (Johncy Bennette)
Date: Fri, 13 Nov 2015 15:10:25 +0530
Subject: dbus + wpa_supplicant 2.5 - p2p interface not working
In-Reply-To: <CAHOgUSnGM-hF9CPmzN4w-3hwQR2NgwfFVOrO2KrCHAgRVWqB4Q@mail.gmail.com>
References: <CAHOgUSnVhVi6Jbem0YDDWKm7jJ1-f2MfYn1C=7D57Z4jDkcYvg@mail.gmail.com>
 <1446833244.10453.5.camel@redhat.com>
 <CAHOgUSnGM-hF9CPmzN4w-3hwQR2NgwfFVOrO2KrCHAgRVWqB4Q@mail.gmail.com>
Message-ID: <CAHOgUS=+6FqTuq-dLh85v2S3QprO5JiOmSH78h-YcLN565+sqw@mail.gmail.com>

Hi,
    The patch from below site resolved my issue.
http://w1.fi/cgit/hostap/commit/?id=5441da2beb99c67e4f7790b114c65a2cc748f166

This was not present in my wpa_supplicant.

Regards,
Johncy.

On 7 November 2015 at 16:11, Johncy Bennette <johncyrr at gmail.com> wrote:
> Thanks Dan. I will run with gdb once I am back to office.
>
> From the wpa_supplicant debug message for wlan0 I could see,
> ----------------------------------------------------------------------------------------------
> Successfully replaced leftover ctrl_iface socket '/var/run/wpa_supplicant/wlan0'
>
> dbus: Register interface object '/fi/w1/wpa_supplicant1/Interfaces/1'
>
> wlan0: Added interface wlan0
>
> wlan0: State: INACTIVE -> DISCONNECTED
>
> nl80211: Set wlan0 operstate 0->0 (DORMANT)
>
>
> But for p2p-dev-wlan0, I couldn?t see any register with dbus object.
> Not sure if this could be the problem?
> -----------------------------------------------------------------------------------------------------
> Successfully replaced leftover ctrl_iface socket
> '/var/run/wpa_supplicant/p2p-dev-wlan0'
>
> P2P: Add operating class 81
>
> P2P: Channels - hexdump(len=11): 01 02 03 04 05 06 07 08 09 0a 0b
>
> P2P: Own listen channel: 81:1
>
> P2P: Random operating channel: 81:11
>
> P2P: initialized
>
> P2P: channels: 81:1,2,3,4,5,6,7,8,9,10,11
>
> P2P: cli_channels:
>
> p2p-dev-wlan0: Added interface p2p-dev-wlan0
>
> p2p-dev-wlan0: State: INACTIVE -> DISCONNECTED
>
> nl80211: Set p2p-dev-wlan0 operstate 0->0 (DORMANT)
>
> netlink: Operstate: ifindex=0 linkmode=-1 (no change), operstate=5
> (IF_OPER_DORMANT)
>
>
> Code from notify.c in wpa_supplicant,
>
> int wpas_notify_iface_added(struct wpa_supplicant *wpa_s)
> {
> if (wpa_s->p2p_mgmt)
> return 0;
>
> if (wpas_dbus_register_iface(wpa_s))
> return -1;
>
> if (wpas_dbus_register_interface(wpa_s))
> return -1;
>
> return 0;
> }
>
> Whats the p2p_mgmt is for?
>
> Regards,
> Johncy.
>
> On 6 November 2015 at 23:37, Dan Williams <dcbw at redhat.com> wrote:
>> On Fri, 2015-11-06 at 23:06 +0530, Johncy Bennette wrote:
>>> Hi,
>>> I am using dbus interface + wpa_supplicant 2.5. My WiFi interface is
>>> working fine. With p2p interface I am facing problems. I invoke my
>>> wpa_supplicant as
>>> wpa_supplicant -iwlan0 -u -B -c/etc/wpa_supplicant.conf
>>> I send the below command to query the available interfaces
>>>
>>> dbus-send --system --print-reply --dest=fi.w1.wpa_supplicant1
>>> /fi/w1/wpa_supplicant1 org.freedesktop.DBus.Properties.Get
>>> string:fi.w1.wpa_supplicant1 string:Interfaces
>>>
>>> But with this my wpa_supplicant gets killed.
>>
>> This indicates that there is a bug in wpa_supplicant 2.5.  Can you run
>> the supplicant under 'gdb' and get a backtrace when it dies in gdb?
>>
>> Dan
>>
>>> With wpa_supplicant 2.1, I get the dbus-send command successfully return
>>>
>>> dbus-send --system --print-reply --dest=fi.w1.wpa_supplicant1
>>> /fi/w1/wpa_supplicant1 org.freedesktop.DBus.Properties.Get
>>> string:fi.w1.wpa_supplicant1 string:Interfaces
>>>
>>> method return sender=:1.5 -> dest=:1.11 reply_serial=2
>>>
>>> variant array [
>>>
>>> object path "/fi/w1/wpa_supplicant1/Interfaces/3"
>>>
>>> object path "/fi/w1/wpa_supplicant1/Interfaces/1"
>>>
>>> ]
>>>
>>> With wpa_supplicant 2.1 the interface for p2p is p2p0. With wpa 2.5,
>>> the p2p-dev-wlan0 is created internally. But the GetInterface API
>>> fails when p2p-dev-wlan0 is given as parameter for GetInterface. All
>>> the p2p_group_add fails either. I am not sure if I am missing any
>>> configuration?
>>>
>>> Attached my wpa_supplicant debug log.
>>>
>>> Regards,
>>>
>>> Johncy.
>>> _______________________________________________
>>> Hostap mailing list
>>> Hostap at lists.infradead.org
>>> http://lists.infradead.org/mailman/listinfo/hostap
>>
>>


From michael.goff7442 at gmail.com  Sat Nov 14 13:56:03 2015
From: michael.goff7442 at gmail.com (Michael Goff)
Date: Sat, 14 Nov 2015 14:56:03 -0700
Subject: Fwd: HOSTAPD drops clients
In-Reply-To: <CANs47VwZGnkUT+emo7uoUcqjG=BPo03jnf_Zxh3awUoSiei7fw@mail.gmail.com>
References: <CANs47VwZGnkUT+emo7uoUcqjG=BPo03jnf_Zxh3awUoSiei7fw@mail.gmail.com>
Message-ID: <CANs47VxBbCTBarUKyV2KYs2yb-8JsY6EuzDWoQatdFgM3irpYg@mail.gmail.com>

I have an issue with HOSTAPD drooping clients. I have tried two
different scenarios: 1 as a full router with AP and 2 as a wifi
bridge. I am using a raspberry pi. I used the HOSTAPD published by
adafruit. It includes wifi card drivers. I have tried several things
to try to fix it even using haveged to try to fix entropy but in all
cases it stops allowing clients but the services itself does not not
stop. I get the following entries in syslog:

Nov  9 21:58:17 wap hostapd: wlan0: STA 00:bb:3a:35:74:e1 WPA: group
key handshake completed (RSN)
Nov  9 22:08:17 wap hostapd: wlan0: STA 18:3d:a2:8e:64:ec WPA: group
key handshake completed (RSN)
Nov  9 22:08:17 wap hostapd: wlan0: STA 00:bb:3a:35:74:e1 WPA: group
key handshake completed (RSN)
Nov  9 22:12:55 wap dhcpcd[608]: wlan0: if_sendrawpacket: No buffer
space available
Nov  9 22:12:55 wap dhcpcd[608]: wlan0: deleting route to 169.254.0.0/16
Nov  9 22:12:55 wap avahi-daemon[584]: Withdrawing address record for
169.254.210.76 on wlan0.
Nov  9 22:12:55 wap avahi-daemon[584]: Leaving mDNS multicast group on
interface wlan0.IPv4 with address 169.254.210.76.
Nov  9 22:12:55 wap avahi-daemon[584]: Interface wlan0.IPv4 no longer
relevant for mDNS.
Nov  9 22:12:57 wap ntpd[715]: Deleting interface #10 wlan0,
169.254.210.76#123, interface stats: received=0, sent=0, dropped=0, ac
tive_time=8050 secs
Nov  9 22:12:57 wap ntpd[715]: peers refreshed
Nov  9 22:17:01 wap CRON[1629]: (root) CMD (   cd / && run-parts
--report /etc/cron.hourly)
Nov  9 22:18:21 wap hostapd: wlan0: STA 18:3d:a2:8e:64:ec IEEE 802.11:
deauthenticated due to local deauth request
Nov  9 22:18:21 wap hostapd: wlan0: STA 00:bb:3a:35:74:e1 IEEE 802.11:
deauthenticated due to local deauth request
Nov  9 22:18:21 wap hostapd: wlan0: STA 18:3d:a2:8e:64:ec IEEE 802.11:
disassociated
Nov  9 22:18:21 wap hostapd: wlan0: STA 00:bb:3a:35:74:e1 IEEE 802.11:
disassociated

I do hope that there is actually a fix for this. I have opened threads
on many support sites but no one has been able to help. Can someone
help please?


From dima at dimakrasner.com  Tue Nov  3 14:38:26 2015
From: dima at dimakrasner.com (Dima Krasner)
Date: Wed, 4 Nov 2015 00:38:26 +0200
Subject: [PATCH] Fixed libnl-tiny support
Message-ID: <20151104003826.6f63e8cadbfabd4948c31bcc@dimakrasner.com>

Hi,

This patch fixes libnl-tiny support in wpa_supplicant. It's important, so we can have small, static wpa_supplicant binaries.

Cheers,
Dima

>From 63f8959983605006e022648f58dd56aa25588d88 Mon Sep 17 00:00:00 2001
From: Dima Krasner <dima at dimakrasner.com>
Date: Wed, 4 Nov 2015 00:36:08 +0200
Subject: [PATCH] Fixed libnl-tiny support

---
 src/drivers/driver_nl80211.c | 7 +++++++
 src/drivers/drivers.mak      | 1 +
 2 files changed, 8 insertions(+)

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index e83a3df..f3cc806 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -39,6 +39,13 @@
 #include "driver_nl80211.h"
 
 
+#ifdef CONFIG_LIBNL_TINY
+#define nl_handle nl_sock
+#define nl_handle_alloc_cb nl_socket_alloc_cb
+#define nl_handle_destroy nl_socket_free
+#endif
+
+
 #ifndef CONFIG_LIBNL20
 /*
  * libnl 1.1 has a bug, it tries to allocate socket numbers densely
diff --git a/src/drivers/drivers.mak b/src/drivers/drivers.mak
index c4f5f97..2ac6d48 100644
--- a/src/drivers/drivers.mak
+++ b/src/drivers/drivers.mak
@@ -172,6 +172,7 @@ ifdef CONFIG_LIBNL32
 else
   ifdef CONFIG_LIBNL_TINY
     DRV_LIBS += -lnl-tiny
+    DRV_CFLAGS += -DCONFIG_LIBNL_TINY
   else
     DRV_LIBS += -lnl
   endif
-- 
1.9.1



-- 
Dima Krasner <dima at dimakrasner.com>



From avichal.a at samsung.com  Mon Nov  2 20:50:58 2015
From: avichal.a at samsung.com (Avichal Agarwal)
Date: Tue, 03 Nov 2015 04:50:58 +0000 (GMT)
Subject: [PATCH] [DBus] Add support for vendor specific methods on dbus
Message-ID: <278560362.415631446526258928.JavaMail.weblogic@ep2mlwas01c>

Representation of data in hex-form is quite more understandable because there can be multiple vendor elements.
If array of bytes  is used then binary data will be sent , I agree it will remove hex to binary conversion code.
But in case of VendorElemGet , output will come as binary data .

If you want we will modify that.

Avichal Agarwal 

------- Original Message -------
Sender : Jouni Malinen<j at w1.fi>
Date : Nov 01, 2015 01:03 (GMT+05:30)
Title : Re: [PATCH] [DBus] Add support for vendor specific methods on dbus

On Thu, Oct 29, 2015 at 06:12:52AM +0000, Avichal Agarwal wrote:
> this also includes dbus.doxygen

Thanks.

> Methods are
> 1.VendorElemAdd type "is" i=integer  s=string
> 2.VendorElemGet "i" i=integer  (output string)
> 3.VendorElemRem "is" i=integer s=string

> +   
s : ielems

> +   
Hexdump of Information Element(s).


This string part is making my question whether this is really the best
design for the D-Bus interface. I had not full realized this, but with
the documentation added, it became clear that this would be a hexdump of
the binary IEs. While that is needed for the ASCII text-based control
interface, the D-Bus interface does not have such constraints and we
use ay (array of bytes) type with number of other binary items.
Shouldn't these VendorElem* methods do the same instead of require the
application using them to convert between binary and ASCII hexdump?

The attach patch is a bit cleaned up version that I was considering to
write a hwsim test case for. Please use that for any updated version if
you agree with the s (hexdump) --> ay format change.

-- 
Jouni Malinen                                            PGP id EFC895FA

From j at w1.fi  Sun Nov 15 00:52:49 2015
From: j at w1.fi (Jouni Malinen)
Date: Sun, 15 Nov 2015 10:52:49 +0200
Subject: [PATCH] Fixed libnl-tiny support
In-Reply-To: <20151104003826.6f63e8cadbfabd4948c31bcc@dimakrasner.com>
References: <20151104003826.6f63e8cadbfabd4948c31bcc@dimakrasner.com>
Message-ID: <20151115085249.GA3392@w1.fi>

On Wed, Nov 04, 2015 at 12:38:26AM +0200, Dima Krasner wrote:
> This patch fixes libnl-tiny support in wpa_supplicant. It's important, so we can have small, static wpa_supplicant binaries.

Could you please read the top-level CONTRIBUTIONS file and re-send this
with Signed-off-by: line added to the commit message as described in
that file so that I can apply the changes.

-- 
Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Sun Nov 15 02:53:37 2015
From: j at w1.fi (Jouni Malinen)
Date: Sun, 15 Nov 2015 12:53:37 +0200
Subject: Encryption of Management frames
In-Reply-To: <EC18CD4F248FCC49B53632D772F729D626413060@DFRE01.ent.ti.com>
References: <EC18CD4F248FCC49B53632D772F729D626413060@DFRE01.ent.ti.com>
Message-ID: <20151115105337.GA19307@w1.fi>

On Wed, Nov 11, 2015 at 03:06:06PM +0000, Hahn, Maital wrote:
> I'm trying to find how management frames (Action frames, to be more specific) 
> are marked for encryption in the Hostap code, and was hoping you can help me.
> 
> I found some reference to this subject in the RX path (under CONFIG_IEEE80211W), but none in the TX path.
> Is it supported?

Yes, but the encryption part is fully handled by the driver (and/or
kernel stack like mac80211).

-- 
Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Sun Nov 15 02:56:14 2015
From: j at w1.fi (Jouni Malinen)
Date: Sun, 15 Nov 2015 12:56:14 +0200
Subject: Vendor-specific attributes
In-Reply-To: <D4FF869F9112FC479505FCD95E9B6A1954AA0128@DEFTHW99EZ4MSX.ww931.my-it-solutions.net>
References: <D4FF869F9112FC479505FCD95E9B6A1954AA0128@DEFTHW99EZ4MSX.ww931.my-it-solutions.net>
Message-ID: <20151115105614.GB19307@w1.fi>

On Mon, Nov 09, 2015 at 10:24:16AM +0000, Wegener, Norbert wrote:
> Years ago there was a thread about eapol_test and vendor specific attributes:
> http://lists.shmoo.com/pipermail/hostap/2009-January/019132.html
> As this topic comes back to me theses days and I did not find any information about that:
> Has this patch been integrated? How would I pass an attribute from 
> freeradius' dictionary.siemens (e.g. Siemens-SSID) to eapol_test?

No, this has not been applied. You can add arbitrary RADIUS attributes
with the eapol_test -N command line argument, though.

-- 
Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Sun Nov 15 08:58:19 2015
From: j at w1.fi (Jouni Malinen)
Date: Sun, 15 Nov 2015 18:58:19 +0200
Subject: [PATCH] [DBus] Add support for vendor specific methods on dbus
In-Reply-To: <278560362.415631446526258928.JavaMail.weblogic@ep2mlwas01c>
References: <278560362.415631446526258928.JavaMail.weblogic@ep2mlwas01c>
Message-ID: <20151115165819.GA24360@w1.fi>

On Tue, Nov 03, 2015 at 04:50:58AM +0000, Avichal Agarwal wrote:
> Representation of data in hex-form is quite more understandable because there can be multiple vendor elements.
> If array of bytes  is used then binary data will be sent , I agree it will remove hex to binary conversion code.
> But in case of VendorElemGet , output will come as binary data .
> 
> If you want we will modify that.

I'm not sure I understand how a hexdump would be any more understandable
than binary data regardless of how many vendor elements there are. The
existing examples that use IE(s) in the D-Bus interface use binary and I
think that this new addition should be modified to do same.
 
-- 
Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Sun Nov 15 09:16:22 2015
From: j at w1.fi (Jouni Malinen)
Date: Sun, 15 Nov 2015 19:16:22 +0200
Subject: [PATCH 1/2] IAPP: Set SO_REUSEPORT on listening socket
In-Reply-To: <1447179434-18596-1-git-send-email-bordjukov@gmail.com>
References: <1447179434-18596-1-git-send-email-bordjukov@gmail.com>
Message-ID: <20151115171622.GB24360@w1.fi>

On Tue, Nov 10, 2015 at 08:17:13PM +0200, Petko Bordjukov wrote:
> Make it possible for several instances of hostapd to listen on the same
> network interface.

> diff --git a/src/ap/iapp.c b/src/ap/iapp.c
> @@ -447,6 +448,15 @@ struct iapp_data * iapp_init(struct hostapd_data *hapd, const char *iface)
>  	os_memset(&uaddr, 0, sizeof(uaddr));
>  	uaddr.sin_family = AF_INET;
>  	uaddr.sin_port = htons(IAPP_UDP_PORT);
> +
> +	if (setsockopt(iapp->udp_sock, SOL_SOCKET, SO_REUSEPORT, &reuseport,
> +		       sizeof(reuseport)) < 0) {

SO_REUSEPORT is a pretty recent addition. Wouldn't this break build with
older header files? As such, this should probably be protected with
#ifdef SO_REUSEPORT or something similar.

> +		wpa_printf(MSG_INFO, "iapp_init - setsockopt[UDP,SO_REUSEPORT]: %s",
> +			   strerror(errno));
> +		iapp_deinit(iapp);
> +		return NULL;
> +	}

And this should not return failure on error since anything older than
Linux 3.9 would fail here. It sounds like it would be safe to ignore the
error and continue to get the existing behavior.

-- 
Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Sun Nov 15 11:10:04 2015
From: j at w1.fi (Jouni Malinen)
Date: Sun, 15 Nov 2015 21:10:04 +0200
Subject: [PATCH] [DBus]: Add SaveConfig to update configuration file
In-Reply-To: <463125029.430151446534087858.JavaMail.weblogic@ep2mlwas05a>
References: <463125029.430151446534087858.JavaMail.weblogic@ep2mlwas05a>
Message-ID: <20151115191004.GA19555@w1.fi>

On Tue, Nov 03, 2015 at 07:01:27AM +0000, Purushottam Kushwaha wrote:
> This is similar to save_config on control interface,
> which allow users to update configuration file.

Thanks, applied.
 
-- 
Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Sun Nov 15 11:10:20 2015
From: j at w1.fi (Jouni Malinen)
Date: Sun, 15 Nov 2015 21:10:20 +0200
Subject: [PATCH] Copy Paste error in debug print
In-Reply-To: <409294535.430481446534238577.JavaMail.weblogic@ep2mlwas05a>
References: <409294535.430481446534238577.JavaMail.weblogic@ep2mlwas05a>
Message-ID: <20151115191020.GB19555@w1.fi>

Thanks, applied.
 
-- 
Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Sun Nov 15 11:10:34 2015
From: j at w1.fi (Jouni Malinen)
Date: Sun, 15 Nov 2015 21:10:34 +0200
Subject: [PATCH] Typo in debug message
In-Reply-To: <584674899.430781446534415537.JavaMail.weblogic@ep2mlwas05a>
References: <584674899.430781446534415537.JavaMail.weblogic@ep2mlwas05a>
Message-ID: <20151115191034.GC19555@w1.fi>

Thanks, applied.
 
-- 
Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Sun Nov 15 11:10:54 2015
From: j at w1.fi (Jouni Malinen)
Date: Sun, 15 Nov 2015 21:10:54 +0200
Subject: [PATCH 1/2] nl80211-scan:  add debug message for passive scanning.
In-Reply-To: <1446684579-30288-1-git-send-email-greearb@candelatech.com>
References: <1446684579-30288-1-git-send-email-greearb@candelatech.com>
Message-ID: <20151115191054.GD19555@w1.fi>

Thanks, both applied.
 
-- 
Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Sun Nov 15 11:11:14 2015
From: j at w1.fi (Jouni Malinen)
Date: Sun, 15 Nov 2015 21:11:14 +0200
Subject: [PATCH] external/wpa_supplicant8: Use libdbus rather than dbus-1
In-Reply-To: <CABctT5cK-uifsdzbZzNnVcXikmVerENKvxXxRxG2Cv0G6EhEtQ@mail.gmail.com>
References: <CABctT5cK-uifsdzbZzNnVcXikmVerENKvxXxRxG2Cv0G6EhEtQ@mail.gmail.com>
Message-ID: <20151115191114.GE19555@w1.fi>

On Thu, Nov 05, 2015 at 12:04:42PM -0800, Samuel Tan wrote:
> The upstream wpa_supplicant uses the dbus-1 library when
> it is compiled with D-Bus support. In Android, we imported
> the D-Bus shared libraries under the name "libdbus", so
> use this shared library instead of dbus-1 when compiling
> WPA supplicant with D-Bus support.

Thanks, applied.
 
-- 
Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Sun Nov 15 11:11:30 2015
From: j at w1.fi (Jouni Malinen)
Date: Sun, 15 Nov 2015 21:11:30 +0200
Subject: [PATCH] Fix pointer arithmetic on a void*
In-Reply-To: <CABctT5diGg9eYwAYm1LY4zydv1YpA+wPyeuQmqOeDhRNRW0ZOw@mail.gmail.com>
References: <CABctT5diGg9eYwAYm1LY4zydv1YpA+wPyeuQmqOeDhRNRW0ZOw@mail.gmail.com>
Message-ID: <20151115191130.GF19555@w1.fi>

On Thu, Nov 05, 2015 at 12:05:56PM -0800, Samuel Tan wrote:
> Fails to compile on x86 gcc due to pointer arithmetic on
> a void*

Thanks, applied.
 
-- 
Jouni Malinen                                            PGP id EFC895FA


From bordjukov at gmail.com  Sun Nov 15 18:56:42 2015
From: bordjukov at gmail.com (Petko Bordjukov)
Date: Mon, 16 Nov 2015 04:56:42 +0200
Subject: [PATCH 1/2] IAPP: Set SO_REUSEPORT on listening socket
In-Reply-To: <20151115171622.GB24360@w1.fi>
References: <1447179434-18596-1-git-send-email-bordjukov@gmail.com>
 <20151115171622.GB24360@w1.fi>
Message-ID: <1447642602.3475.13.camel@gmail.com>

Hello and thank you for the feedback!

On ??, 2015-11-15 at 19:16 +0200, Jouni Malinen wrote:
> SO_REUSEPORT is a pretty recent addition. Wouldn't this break build
> with older header files? As such, this should probably be protected
> with #ifdef SO_REUSEPORT or something similar.

Yes, SO_REUSEPORT is indeed a fairly new addition to Linux. I could
protect it with an ifdef or I could just use SO_REUSEADDR. If I
understand correctly there is little difference between the two with
regards to multicast (with the exception of the UID checking for
SO_REUSEPORT).

Having said that, I have not tested SO_REUSEADDR yet. I will and
depending on the results will either submit a new version with
SO_REUSEADDR or one with an ifdef around the setsockopt invocation.

> It sounds like it would be safe to ignore the error and continue to
> get the existing behavior.

Yes, it would be safe to continue. Should I make it just log a
MSG_WARNING and carry on instead?

--
Regards,
P.


From mayank.h at samsung.com  Mon Nov 16 22:19:57 2015
From: mayank.h at samsung.com (MAYANK HAARIT)
Date: Tue, 17 Nov 2015 06:19:57 +0000 (GMT)
Subject: [PATCH] Dbus : Freeing the message after message send in
 InvitationReceived signal
Message-ID: <1143289692.129481447741197430.JavaMail.weblogic@ep2mlwas08d>

Freeing the message after message send in wpas_dbus_signal_p2p_invitation_received()

Signed-off-by: Mayank Haarit <mayank.h at samsung.com>
Signed-off-by: Avichal Agarwal <avichal.a at samsung.com>
---
 wpa_supplicant/dbus/dbus_new.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/wpa_supplicant/dbus/dbus_new.c b/wpa_supplicant/dbus/dbus_new.c
index 1bbfe49..440b8cf 100644
--- a/wpa_supplicant/dbus/dbus_new.c
+++ b/wpa_supplicant/dbus/dbus_new.c
@@ -1950,6 +1950,7 @@ void wpas_dbus_signal_p2p_invitation_received(struct wpa_supplicant *wpa_s,
 	}
 
 	dbus_connection_send(iface->con, msg, NULL);
+	dbus_message_unref(msg);
 }
 
 
-- 
1.7.0.4

From yanivt at ti.com  Tue Nov 17 01:22:00 2015
From: yanivt at ti.com (Tzoreff, Yaniv)
Date: Tue, 17 Nov 2015 09:22:00 +0000
Subject: minimum code footprint for wpa_supplicant (STA, AP & P2P)
Message-ID: <C298D3796A1F7748A33B68640945355224A977C5@DFRE01.ent.ti.com>

Hi all, 
We would like to use the hostap and the wpa_supplicant in specific in order to activate STA, AP and P2P. 
For STA, we would like to support all kind of encryption methods. 
For AP, we don't need to have enterprise security capabilities. 
A key requirement for our implementation is to have minimum code footprint for both .text and .bss. ?
I would appreciate your assistance in understanding how we can minimize the code. 
1. Can you please specify which files are must for these requirements (we are currently using WPA_supplicant files with some additions from hostapd, but I am not sure it is needed, please see attachment with files list we are using)? Should we add/remove any from the list? 
2. Are there any defines/configurations you can recommend to change in order to minimize the WPA_supplicant without degrading any basic capability (I realize basic is amorphous)? 
3. Are there any other methods/ideas for minimizing .bss or .text of wpa_supplicant? 

Regards, 

Yaniv Tzoreff

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: hostap_files.txt
URL: <http://lists.infradead.org/pipermail/hostap/attachments/20151117/1ad15ff1/attachment.txt>

From ilan.peer at intel.com  Tue Nov 17 05:08:22 2015
From: ilan.peer at intel.com (Ilan Peer)
Date: Tue, 17 Nov 2015 15:08:22 +0200
Subject: [PATCH 0/2] Scheduled Scan Plans
Message-ID: <1447765704-14553-1-git-send-email-ilan.peer@intel.com>

Add support for scan plans for scheduled scan. Each scan plan
specifies the number of iterations to run the scan request and
the interval between iterations. When a scan plan finishes
(i.e., it was run for the specified number of iterations),
the next scan plan is executed. The last scan plan will run
infinitely

The patch set depends on the latest nl80211.h from mac80211-next.

Avraham Stern (2):
  driver: Add support for multiple scan plans for scheduled scan
  wpa_supplicant: Add support for scheduled scan plans configurations

 src/drivers/driver.h               |  35 +++++-
 src/drivers/driver_nl80211.c       |  10 +-
 src/drivers/driver_nl80211.h       |   3 +-
 src/drivers/driver_nl80211_capa.c  |  19 ++++
 src/drivers/driver_nl80211_scan.c  |  94 ++++++++++++++--
 wpa_supplicant/autoscan.c          |  27 ++++-
 wpa_supplicant/config.c            |   3 +
 wpa_supplicant/config.h            |  11 ++
 wpa_supplicant/config_file.c       |   3 +
 wpa_supplicant/driver_i.h          |   6 +-
 wpa_supplicant/scan.c              | 217 +++++++++++++++++++++++++++++++++----
 wpa_supplicant/scan.h              |   3 +-
 wpa_supplicant/wpa_supplicant.c    |  11 ++
 wpa_supplicant/wpa_supplicant.conf |  18 +++
 wpa_supplicant/wpa_supplicant_i.h  |   7 +-
 15 files changed, 421 insertions(+), 46 deletions(-)

-- 
1.9.1



From ilan.peer at intel.com  Tue Nov 17 05:08:23 2015
From: ilan.peer at intel.com (Ilan Peer)
Date: Tue, 17 Nov 2015 15:08:23 +0200
Subject: [PATCH 1/2] driver: Add support for multiple scan plans for scheduled
 scan
In-Reply-To: <1447765704-14553-1-git-send-email-ilan.peer@intel.com>
References: <1447765704-14553-1-git-send-email-ilan.peer@intel.com>
Message-ID: <1447765704-14553-2-git-send-email-ilan.peer@intel.com>

From: Avraham Stern <avraham.stern at intel.com>

Add 'scan plans' to driver scan parameters for scheduled scan.
Each 'scan plan' specifies the number of iterations to run the scan
request and the interval between iterations. When a scan plan
finishes (i.e., it was run for the specified number of iterations),
the next scan plan is executed. The last scan plan will run
infinitely.

The maximum number of supported scan plans, the maximum number of
iterations for a single scan plan and the maximum scan interval
are advertised by the driver.

Signed-off-by: Avraham Stern <avraham.stern at intel.com>
---
 src/drivers/driver.h              | 35 +++++++++++++--
 src/drivers/driver_nl80211.c      | 10 ++++-
 src/drivers/driver_nl80211.h      |  3 +-
 src/drivers/driver_nl80211_capa.c | 19 ++++++++
 src/drivers/driver_nl80211_scan.c | 94 ++++++++++++++++++++++++++++++++++++---
 wpa_supplicant/driver_i.h         |  6 +--
 wpa_supplicant/scan.c             | 25 ++++++++++-
 7 files changed, 173 insertions(+), 19 deletions(-)

diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 09c4fa1..252a9fc 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -407,6 +407,28 @@ struct wpa_driver_scan_params {
 	 */
 	const u8 *mac_addr_mask;
 
+	/**
+	 * sched_scan_plans - scan plans for scheduled scan
+	 *
+	 * Each scan plan consists of the number of iterations to scan and the
+	 * interval between scans. When a scan plan finishes (i.e., it was run
+	 * for the specified number of iterations), the next scan plan is
+	 * executed. The scan plans are executed in the order they appear in
+	 * the array (lower index first). The last scan plan will run infinitely
+	 * (until requested to stop), thus must not specify the number of
+	 * iterations. All other scan plans must specify the number of
+	 * iterations.
+	 */
+	struct sched_scan_plan {
+		 u32 interval; /* in seconds */
+		 u32 iterations; /* Zero to run infinitely */
+	 } *sched_scan_plans;
+
+	/**
+	 * sched_scan_plans_num - number of scan plans in sched_scan_plans array
+	 */
+	 size_t sched_scan_plans_num;
+
 	/*
 	 * NOTE: Whenever adding new parameters here, please make sure
 	 * wpa_scan_clone_params() and wpa_scan_free_params() get updated with
@@ -1233,6 +1255,15 @@ struct wpa_driver_capa {
 	/** Maximum number of supported active probe SSIDs for sched_scan */
 	int max_sched_scan_ssids;
 
+	/** Maximum number of supported scan plans for scheduled scan */
+	size_t max_sched_scan_plans;
+
+	/** Maximum interval in a scan plan. In seconds */
+	u32 max_sched_scan_plan_interval;
+
+	/** Maximum number of iterations in a single scan plan */
+	u32 max_sched_scan_plan_iterations;
+
 	/** Whether sched_scan (offloaded scanning) is supported */
 	int sched_scan_supported;
 
@@ -2994,7 +3025,6 @@ struct wpa_driver_ops {
 	 * sched_scan - Request the driver to initiate scheduled scan
 	 * @priv: Private driver interface data
 	 * @params: Scan parameters
-	 * @interval: Interval between scan cycles in milliseconds
 	 * Returns: 0 on success, -1 on failure
 	 *
 	 * This operation should be used for scheduled scan offload to
@@ -3005,8 +3035,7 @@ struct wpa_driver_ops {
 	 * and if not provided or if it returns -1, we fall back to
 	 * normal host-scheduled scans.
 	 */
-	int (*sched_scan)(void *priv, struct wpa_driver_scan_params *params,
-			  u32 interval);
+	int (*sched_scan)(void *priv, struct wpa_driver_scan_params *params);
 
 	/**
 	 * stop_sched_scan - Request the driver to stop a scheduled scan
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index e83a3df..5dbc80c 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -7540,7 +7540,10 @@ static int wpa_driver_nl80211_status(void *priv, char *buf, size_t buflen)
 				  "capa.mac_addr_rand_scan_supported=%d\n"
 				  "capa.conc_capab=%u\n"
 				  "capa.max_conc_chan_2_4=%u\n"
-				  "capa.max_conc_chan_5_0=%u\n",
+				  "capa.max_conc_chan_5_0=%u\n"
+				  "capa.max_sched_scan_plans=%zu\n"
+				  "capa.max_sched_scan_plan_interval=%u\n"
+				  "capa.max_sched_scan_plan_iterations=%u\n",
 				  drv->capa.key_mgmt,
 				  drv->capa.enc,
 				  drv->capa.auth,
@@ -7559,7 +7562,10 @@ static int wpa_driver_nl80211_status(void *priv, char *buf, size_t buflen)
 				  drv->capa.mac_addr_rand_scan_supported,
 				  drv->capa.conc_capab,
 				  drv->capa.max_conc_chan_2_4,
-				  drv->capa.max_conc_chan_5_0);
+				  drv->capa.max_conc_chan_5_0,
+				  drv->capa.max_sched_scan_plans,
+				  drv->capa.max_sched_scan_plan_interval,
+				  drv->capa.max_sched_scan_plan_iterations);
 		if (os_snprintf_error(end - pos, res))
 			return pos - buf;
 		pos += res;
diff --git a/src/drivers/driver_nl80211.h b/src/drivers/driver_nl80211.h
index ea5f058..a7e11a8 100644
--- a/src/drivers/driver_nl80211.h
+++ b/src/drivers/driver_nl80211.h
@@ -276,8 +276,7 @@ void wpa_driver_nl80211_scan_timeout(void *eloop_ctx, void *timeout_ctx);
 int wpa_driver_nl80211_scan(struct i802_bss *bss,
 			    struct wpa_driver_scan_params *params);
 int wpa_driver_nl80211_sched_scan(void *priv,
-				  struct wpa_driver_scan_params *params,
-				  u32 interval);
+				  struct wpa_driver_scan_params *params);
 int wpa_driver_nl80211_stop_sched_scan(void *priv);
 struct wpa_scan_results * wpa_driver_nl80211_get_scan_results(void *priv);
 void nl80211_dump_scan(struct wpa_driver_nl80211_data *drv);
diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c
index 59a8efb..a576d6c 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -499,6 +499,19 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
 		capa->max_sched_scan_ssids =
 			nla_get_u8(tb[NL80211_ATTR_MAX_NUM_SCHED_SCAN_SSIDS]);
 
+	if (tb[NL80211_ATTR_MAX_NUM_SCHED_SCAN_PLANS] &&
+	    tb[NL80211_ATTR_MAX_SCAN_PLAN_INTERVAL] &&
+	    tb[NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS]) {
+		capa->max_sched_scan_plans =
+			nla_get_u32(tb[NL80211_ATTR_MAX_NUM_SCHED_SCAN_PLANS]);
+
+		capa->max_sched_scan_plan_interval =
+			nla_get_u32(tb[NL80211_ATTR_MAX_SCAN_PLAN_INTERVAL]);
+
+		capa->max_sched_scan_plan_iterations =
+			nla_get_u32(tb[NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS]);
+	}
+
 	if (tb[NL80211_ATTR_MAX_MATCH_SETS])
 		capa->max_match_sets =
 			nla_get_u8(tb[NL80211_ATTR_MAX_MATCH_SETS]);
@@ -711,6 +724,12 @@ static int wpa_driver_nl80211_get_info(struct wpa_driver_nl80211_data *drv,
 			drv->capa.max_csa_counters = 1;
 	}
 
+	if (!drv->capa.max_sched_scan_plans) {
+		drv->capa.max_sched_scan_plans = 1;
+		drv->capa.max_sched_scan_plan_interval = UINT32_MAX;
+		drv->capa.max_sched_scan_plan_iterations = 0;
+	}
+
 	return 0;
 }
 
diff --git a/src/drivers/driver_nl80211_scan.c b/src/drivers/driver_nl80211_scan.c
index dd1993c..9994a08 100644
--- a/src/drivers/driver_nl80211_scan.c
+++ b/src/drivers/driver_nl80211_scan.c
@@ -1,5 +1,6 @@
 /*
  * Driver interaction with Linux nl80211/cfg80211 - Scanning
+ * Copyright(c) 2015 Intel Deutschland GmbH
  * Copyright (c) 2002-2014, Jouni Malinen <j at w1.fi>
  * Copyright (c) 2007, Johannes Berg <johannes at sipsolutions.net>
  * Copyright (c) 2009-2010, Atheros Communications
@@ -307,17 +308,81 @@ fail:
 	return ret;
 }
 
+static int
+nl80211_sched_scan_add_scan_plans(struct wpa_driver_nl80211_data *drv,
+				  struct nl_msg *msg,
+				  struct wpa_driver_scan_params *params)
+{
+	struct nlattr *plans;
+	struct sched_scan_plan *scan_plans = params->sched_scan_plans;
+	size_t i;
+
+	plans = nla_nest_start(msg, NL80211_ATTR_SCHED_SCAN_PLANS);
+	if (!plans)
+		return -1;
+
+	for (i = 0; i < params->sched_scan_plans_num; i++) {
+		struct nlattr *plan = nla_nest_start(msg, i + 1);
+
+		if (!plan)
+			return -1;
+
+		if (!scan_plans[i].interval ||
+		    scan_plans[i].interval >
+		    drv->capa.max_sched_scan_plan_interval) {
+			wpa_printf(MSG_DEBUG,
+				   "nl80211: scan plan no. %zu: Invalid interval: %u",
+				   i, scan_plans[i].interval);
+			return -1;
+		}
+
+		if (nla_put_u32(msg, NL80211_SCHED_SCAN_PLAN_INTERVAL,
+				scan_plans[i].interval))
+			return -1;
+
+		if (scan_plans[i].iterations >
+		    drv->capa.max_sched_scan_plan_iterations) {
+			wpa_printf(MSG_DEBUG,
+				   "nl80211: scan plan no. %zu: Invalid number of iterations: %u",
+				   i, scan_plans[i].iterations);
+			return -1;
+		}
+
+		if (scan_plans[i].iterations &&
+		    nla_put_u32(msg, NL80211_SCHED_SCAN_PLAN_ITERATIONS,
+				scan_plans[i].iterations))
+			return -1;
+
+		nla_nest_end(msg, plan);
+
+		/*
+		 * All the scan plans must specify the number of iterations
+		 * except the last plan, which will run infinitely. So if the
+		 * number of iterations is not specified, this ought to be the
+		 * last scan plan.
+		 */
+		if (!scan_plans[i].iterations)
+			break;
+	}
+
+	if (i != params->sched_scan_plans_num - 1) {
+		wpa_printf(MSG_DEBUG,
+			   "nl80211: All scan plans but the last must specify number of iterations");
+		return -1;
+	}
+
+	nla_nest_end(msg, plans);
+	return 0;
+}
 
 /**
  * wpa_driver_nl80211_sched_scan - Initiate a scheduled scan
  * @priv: Pointer to private driver data from wpa_driver_nl80211_init()
  * @params: Scan parameters
- * @interval: Interval between scan cycles in milliseconds
  * Returns: 0 on success, -1 on failure or if not supported
  */
 int wpa_driver_nl80211_sched_scan(void *priv,
-				  struct wpa_driver_scan_params *params,
-				  u32 interval)
+				  struct wpa_driver_scan_params *params)
 {
 	struct i802_bss *bss = priv;
 	struct wpa_driver_nl80211_data *drv = bss->drv;
@@ -332,11 +397,27 @@ int wpa_driver_nl80211_sched_scan(void *priv,
 		return android_pno_start(bss, params);
 #endif /* ANDROID */
 
+	if (!params->sched_scan_plans_num ||
+	    params->sched_scan_plans_num > drv->capa.max_sched_scan_plans) {
+		wpa_printf(MSG_ERROR,
+			   "nl80211: Invalid number of scan plans: %zu",
+			   params->sched_scan_plans_num);
+		return -1;
+	}
+
 	msg = nl80211_scan_common(bss, NL80211_CMD_START_SCHED_SCAN, params);
-	if (!msg ||
-	    nla_put_u32(msg, NL80211_ATTR_SCHED_SCAN_INTERVAL, interval))
+	if (!msg)
 		goto fail;
 
+	if (drv->capa.max_sched_scan_plan_iterations) {
+		if (nl80211_sched_scan_add_scan_plans(drv, msg, params))
+			goto fail;
+	} else {
+		if (nla_put_u32(msg, NL80211_ATTR_SCHED_SCAN_INTERVAL,
+				params->sched_scan_plans[0].interval * 1000))
+			goto fail;
+	}
+
 	if ((drv->num_filter_ssids &&
 	    (int) drv->num_filter_ssids <= drv->capa.max_match_sets) ||
 	    params->filter_rssi) {
@@ -399,8 +480,7 @@ int wpa_driver_nl80211_sched_scan(void *priv,
 		goto fail;
 	}
 
-	wpa_printf(MSG_DEBUG, "nl80211: Sched scan requested (ret=%d) - "
-		   "scan interval %d msec", ret, interval);
+	wpa_printf(MSG_DEBUG, "nl80211: Sched scan requested (ret=%d) - ", ret);
 
 fail:
 	nlmsg_free(msg);
diff --git a/wpa_supplicant/driver_i.h b/wpa_supplicant/driver_i.h
index f325154..6599623 100644
--- a/wpa_supplicant/driver_i.h
+++ b/wpa_supplicant/driver_i.h
@@ -100,12 +100,10 @@ static inline int wpa_drv_scan(struct wpa_supplicant *wpa_s,
 }
 
 static inline int wpa_drv_sched_scan(struct wpa_supplicant *wpa_s,
-				     struct wpa_driver_scan_params *params,
-				     u32 interval)
+				     struct wpa_driver_scan_params *params)
 {
 	if (wpa_s->driver->sched_scan)
-		return wpa_s->driver->sched_scan(wpa_s->drv_priv,
-						 params, interval);
+		return wpa_s->driver->sched_scan(wpa_s->drv_priv, params);
 	return -1;
 }
 
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index 076766e..9f908e2 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -271,14 +271,23 @@ int wpa_supplicant_start_sched_scan(struct wpa_supplicant *wpa_s,
 				    int interval)
 {
 	int ret;
+	struct sched_scan_plan scan_plan = {
+		.interval = interval,
+		.iterations = 0,
+	};
+
+	params->sched_scan_plans = &scan_plan;
+	params->sched_scan_plans_num = 1;
 
 	wpa_supplicant_notify_scanning(wpa_s, 1);
-	ret = wpa_drv_sched_scan(wpa_s, params, interval * 1000);
+	ret = wpa_drv_sched_scan(wpa_s, params);
 	if (ret)
 		wpa_supplicant_notify_scanning(wpa_s, 0);
 	else
 		wpa_s->sched_scanning = 1;
 
+	params->sched_scan_plans = NULL;
+	params->sched_scan_plans_num = 0;
 	return ret;
 }
 
@@ -2217,6 +2226,19 @@ wpa_scan_clone_params(const struct wpa_driver_scan_params *src)
 	params->only_new_results = src->only_new_results;
 	params->low_priority = src->low_priority;
 
+	if (src->sched_scan_plans_num > 0) {
+		params->sched_scan_plans =
+			os_malloc(sizeof(*src->sched_scan_plans) *
+				  src->sched_scan_plans_num);
+		if (!params->sched_scan_plans)
+			goto failed;
+
+		os_memcpy(params->sched_scan_plans, src->sched_scan_plans,
+			  sizeof(*src->sched_scan_plans) *
+			  src->sched_scan_plans_num);
+		params->sched_scan_plans_num = src->sched_scan_plans_num;
+	}
+
 	if (src->mac_addr_rand) {
 		params->mac_addr_rand = src->mac_addr_rand;
 
@@ -2254,6 +2276,7 @@ void wpa_scan_free_params(struct wpa_driver_scan_params *params)
 	os_free((u8 *) params->extra_ies);
 	os_free(params->freqs);
 	os_free(params->filter_ssids);
+	os_free(params->sched_scan_plans);
 
 	/*
 	 * Note: params->mac_addr_mask points to same memory allocation and
-- 
1.9.1



From ilan.peer at intel.com  Tue Nov 17 05:08:24 2015
From: ilan.peer at intel.com (Ilan Peer)
Date: Tue, 17 Nov 2015 15:08:24 +0200
Subject: [PATCH 2/2] wpa_supplicant: Add support for scheduled scan plans
 configurations
In-Reply-To: <1447765704-14553-1-git-send-email-ilan.peer@intel.com>
References: <1447765704-14553-1-git-send-email-ilan.peer@intel.com>
Message-ID: <1447765704-14553-3-git-send-email-ilan.peer@intel.com>

From: Avraham Stern <avraham.stern at intel.com>

Add the option to configure scheduled scan plans in the config file.
Each scan plan specifies the interval between scans and the number
of scan iterations. The last plan will run infinitely and thus
specifies only the interval between scan iterations.

usage:
sched_scan_plans=<interval:iterations> <interval2:iterations2> ... <interval>

Signed-off-by: Avraham Stern <avraham.stern at intel.com>
---
 wpa_supplicant/autoscan.c          |  27 ++++-
 wpa_supplicant/config.c            |   3 +
 wpa_supplicant/config.h            |  11 ++
 wpa_supplicant/config_file.c       |   3 +
 wpa_supplicant/scan.c              | 210 +++++++++++++++++++++++++++++++------
 wpa_supplicant/scan.h              |   3 +-
 wpa_supplicant/wpa_supplicant.c    |  11 ++
 wpa_supplicant/wpa_supplicant.conf |  18 ++++
 wpa_supplicant/wpa_supplicant_i.h  |   7 +-
 9 files changed, 257 insertions(+), 36 deletions(-)

diff --git a/wpa_supplicant/autoscan.c b/wpa_supplicant/autoscan.c
index a2cf7a5..d12eb21 100644
--- a/wpa_supplicant/autoscan.c
+++ b/wpa_supplicant/autoscan.c
@@ -1,6 +1,7 @@
 /*
  * WPA Supplicant - auto scan
  * Copyright (c) 2012, Intel Corporation. All rights reserved.
+ * Copyright 2015	Intel Deutschland GmbH
  *
  * This software may be distributed under the terms of the BSD license.
  * See README for more details.
@@ -50,6 +51,11 @@ int autoscan_init(struct wpa_supplicant *wpa_s, int req_scan)
 	size_t nlen;
 	int i;
 	const struct autoscan_ops *ops = NULL;
+	struct sched_scan_plan *scan_plans;
+
+	/* Give preference to scheduled scan plans if supported/configured */
+	if (wpa_s->sched_scan_plans)
+		return 0;
 
 	if (wpa_s->autoscan && wpa_s->autoscan_priv)
 		return 0;
@@ -79,11 +85,23 @@ int autoscan_init(struct wpa_supplicant *wpa_s, int req_scan)
 		return -1;
 	}
 
+	scan_plans = os_malloc(sizeof(*wpa_s->sched_scan_plans));
+	if (!scan_plans)
+		return -1;
+
 	wpa_s->autoscan_params = NULL;
 
 	wpa_s->autoscan_priv = ops->init(wpa_s, params);
-	if (wpa_s->autoscan_priv == NULL)
+	if (!wpa_s->autoscan_priv) {
+		os_free(scan_plans);
 		return -1;
+	}
+
+	scan_plans[0].interval = 5;
+	scan_plans[0].iterations = 0;
+	os_free(wpa_s->sched_scan_plans);
+	wpa_s->sched_scan_plans = scan_plans;
+	wpa_s->sched_scan_plans_num = 1;
 	wpa_s->autoscan = ops;
 
 	wpa_printf(MSG_DEBUG, "autoscan: Initialized module '%s' with "
@@ -116,7 +134,10 @@ void autoscan_deinit(struct wpa_supplicant *wpa_s)
 		wpa_s->autoscan_priv = NULL;
 
 		wpa_s->scan_interval = 5;
-		wpa_s->sched_scan_interval = 0;
+
+		os_free(wpa_s->sched_scan_plans);
+		wpa_s->sched_scan_plans = NULL;
+		wpa_s->sched_scan_plans_num = 0;
 	}
 }
 
@@ -134,7 +155,7 @@ int autoscan_notify_scan(struct wpa_supplicant *wpa_s,
 			return -1;
 
 		wpa_s->scan_interval = interval;
-		wpa_s->sched_scan_interval = interval;
+		wpa_s->sched_scan_plans[0].interval = interval;
 
 		request_scan(wpa_s);
 	}
diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index db5de5f..0e4f544 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -2271,6 +2271,8 @@ void wpa_config_free(struct wpa_config *config)
 	os_free(config->bgscan);
 	os_free(config->wowlan_triggers);
 	os_free(config->fst_group_id);
+	os_free(config->sched_scan_plans);
+
 	os_free(config);
 }
 
@@ -4248,6 +4250,7 @@ static const struct global_parse_data global_fields[] = {
 	{ INT_RANGE(fst_llt, 1, FST_MAX_LLT_MS), 0 },
 #endif /* CONFIG_FST */
 	{ INT_RANGE(wpa_rsc_relaxation, 0, 1), 0 },
+	{ STR(sched_scan_plans), 0 },
 };
 
 #undef FUNC
diff --git a/wpa_supplicant/config.h b/wpa_supplicant/config.h
index 2dd1475..b090ad9 100644
--- a/wpa_supplicant/config.h
+++ b/wpa_supplicant/config.h
@@ -1263,6 +1263,17 @@ struct wpa_config {
 	  * of 4-Way Handshake or message 1 of Group Key Handshake.
 	  */
 	 int wpa_rsc_relaxation;
+
+	/**
+	 * sched_scan_plans - scan plans for scheduled scan
+	 *
+	 * Each scan plan specifies the interval between scans and the number of
+	 * iterations. The last scan plan only specifies the scan interval and
+	 * will be run infinitely.
+	 *
+	 * format: <interval:iterations> <interval2:iterations2> ... <interval>
+	 */
+	 char *sched_scan_plans;
 };
 
 
diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
index 215388c..224aa85 100644
--- a/wpa_supplicant/config_file.c
+++ b/wpa_supplicant/config_file.c
@@ -1303,6 +1303,9 @@ static void wpa_config_write_global(FILE *f, struct wpa_config *config)
 	if (config->wpa_rsc_relaxation != DEFAULT_WPA_RSC_RELAXATION)
 		fprintf(f, "wpa_rsc_relaxation=%d\n",
 			config->wpa_rsc_relaxation);
+
+	if (config->sched_scan_plans)
+		fprintf(f, "sched_scan_plans=%s\n", config->sched_scan_plans);
 }
 
 #endif /* CONFIG_NO_CONFIG_WRITE */
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index 9f908e2..c80e56c 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -267,17 +267,9 @@ wpa_supplicant_sched_scan_timeout(void *eloop_ctx, void *timeout_ctx)
 
 
 int wpa_supplicant_start_sched_scan(struct wpa_supplicant *wpa_s,
-				    struct wpa_driver_scan_params *params,
-				    int interval)
+				    struct wpa_driver_scan_params *params)
 {
 	int ret;
-	struct sched_scan_plan scan_plan = {
-		.interval = interval,
-		.iterations = 0,
-	};
-
-	params->sched_scan_plans = &scan_plan;
-	params->sched_scan_plans_num = 1;
 
 	wpa_supplicant_notify_scanning(wpa_s, 1);
 	ret = wpa_drv_sched_scan(wpa_s, params);
@@ -286,8 +278,6 @@ int wpa_supplicant_start_sched_scan(struct wpa_supplicant *wpa_s,
 	else
 		wpa_s->sched_scanning = 1;
 
-	params->sched_scan_plans = NULL;
-	params->sched_scan_plans_num = 0;
 	return ret;
 }
 
@@ -1191,6 +1181,7 @@ int wpa_supplicant_req_sched_scan(struct wpa_supplicant *wpa_s)
 	unsigned int max_sched_scan_ssids;
 	int wildcard = 0;
 	int need_ssids;
+	struct sched_scan_plan scan_plan;
 
 	if (!wpa_s->sched_scan_supported)
 		return -1;
@@ -1280,11 +1271,6 @@ int wpa_supplicant_req_sched_scan(struct wpa_supplicant *wpa_s)
 
 	if (!ssid || !wpa_s->prev_sched_ssid) {
 		wpa_dbg(wpa_s, MSG_DEBUG, "Beginning of SSID list");
-		if (wpa_s->conf->sched_scan_interval)
-			wpa_s->sched_scan_interval =
-				wpa_s->conf->sched_scan_interval;
-		if (wpa_s->sched_scan_interval == 0)
-			wpa_s->sched_scan_interval = 10;
 		wpa_s->sched_scan_timeout = max_sched_scan_ssids * 2;
 		wpa_s->first_sched_scan = 1;
 		ssid = wpa_s->conf->ssid;
@@ -1369,14 +1355,52 @@ int wpa_supplicant_req_sched_scan(struct wpa_supplicant *wpa_s)
 	scan_params = &params;
 
 scan:
-	if (ssid || !wpa_s->first_sched_scan) {
+	wpa_s->sched_scan_timed_out = 0;
+
+	/*
+	 * We cannot support multiple scan plans if the scan request includes
+	 * too many SSID's, so in this case use only the last scan plan and make
+	 * it run infinitely. It will be stopped by the timeout.
+	 */
+	if (wpa_s->sched_scan_plans_num == 1 ||
+	    (wpa_s->sched_scan_plans_num && !ssid && wpa_s->first_sched_scan)) {
+		params.sched_scan_plans = wpa_s->sched_scan_plans;
+		params.sched_scan_plans_num =
+			wpa_s->sched_scan_plans_num;
+	} else if (wpa_s->sched_scan_plans_num > 1) {
 		wpa_dbg(wpa_s, MSG_DEBUG,
-			"Starting sched scan: interval %d timeout %d",
-			wpa_s->sched_scan_interval, wpa_s->sched_scan_timeout);
+			"Too many SSID's. Default to using single scheduled_scan plan");
+		params.sched_scan_plans =
+			&wpa_s->sched_scan_plans[wpa_s->sched_scan_plans_num - 1];
+		params.sched_scan_plans_num = 1;
 	} else {
+		if (wpa_s->conf->sched_scan_interval)
+			scan_plan.interval =
+				wpa_s->conf->sched_scan_interval;
+		else
+			scan_plan.interval = 10;
+
+		if (scan_plan.interval > wpa_s->max_sched_scan_plan_interval) {
+			wpa_printf(MSG_WARNING,
+				   "Scan interval too long(%u), use the maximum allowed(%u)",
+				   scan_plan.interval,
+				   wpa_s->max_sched_scan_plan_interval);
+			scan_plan.interval =
+				wpa_s->max_sched_scan_plan_interval;
+		}
+
+		scan_plan.iterations = 0;
+		params.sched_scan_plans = &scan_plan;
+		params.sched_scan_plans_num = 1;
+	}
+
+	if (ssid || !wpa_s->first_sched_scan) {
 		wpa_dbg(wpa_s, MSG_DEBUG,
-			"Starting sched scan: interval %d (no timeout)",
-			wpa_s->sched_scan_interval);
+			"Starting sched scan: interval %u timeout %d",
+			params.sched_scan_plans[0].interval,
+			wpa_s->sched_scan_timeout);
+	} else {
+		wpa_dbg(wpa_s, MSG_DEBUG, "Starting sched scan (no timeout)");
 	}
 
 	wpa_setband_scan_freqs(wpa_s, scan_params);
@@ -1390,8 +1414,7 @@ scan:
 		}
 	}
 
-	ret = wpa_supplicant_start_sched_scan(wpa_s, scan_params,
-					      wpa_s->sched_scan_interval);
+	ret = wpa_supplicant_start_sched_scan(wpa_s, scan_params);
 	wpabuf_free(extra_ie);
 	os_free(params.filter_ssids);
 	if (ret) {
@@ -1409,9 +1432,12 @@ scan:
 				       wpa_s, NULL);
 		wpa_s->first_sched_scan = 0;
 		wpa_s->sched_scan_timeout /= 2;
-		wpa_s->sched_scan_interval *= 2;
-		if (wpa_s->sched_scan_timeout < wpa_s->sched_scan_interval) {
-			wpa_s->sched_scan_interval = 10;
+		params.sched_scan_plans[0].interval *= 2;
+		if ((unsigned int)wpa_s->sched_scan_timeout <
+		    params.sched_scan_plans[0].interval ||
+		    params.sched_scan_plans[0].interval >
+		    wpa_s->max_sched_scan_plan_interval) {
+			params.sched_scan_plans[0].interval = 10;
 			wpa_s->sched_scan_timeout = max_sched_scan_ssids * 2;
 		}
 	}
@@ -2290,10 +2316,11 @@ void wpa_scan_free_params(struct wpa_driver_scan_params *params)
 
 int wpas_start_pno(struct wpa_supplicant *wpa_s)
 {
-	int ret, interval, prio;
+	int ret, prio;
 	size_t i, num_ssid, num_match_ssid;
 	struct wpa_ssid *ssid;
 	struct wpa_driver_scan_params params;
+	struct sched_scan_plan scan_plan;
 
 	if (!wpa_s->sched_scan_supported)
 		return -1;
@@ -2387,8 +2414,21 @@ int wpas_start_pno(struct wpa_supplicant *wpa_s)
 	if (wpa_s->conf->filter_rssi)
 		params.filter_rssi = wpa_s->conf->filter_rssi;
 
-	interval = wpa_s->conf->sched_scan_interval ?
-		wpa_s->conf->sched_scan_interval : 10;
+	if (wpa_s->sched_scan_plans_num) {
+		params.sched_scan_plans = wpa_s->sched_scan_plans;
+		params.sched_scan_plans_num =
+			wpa_s->sched_scan_plans_num;
+	} else {
+		/* Set one scan plan that will run infinitely */
+		if (wpa_s->conf->sched_scan_interval)
+			scan_plan.interval = wpa_s->conf->sched_scan_interval;
+		else
+			scan_plan.interval = 10;
+
+		scan_plan.iterations = 0;
+		params.sched_scan_plans = &scan_plan;
+		params.sched_scan_plans_num = 1;
+	}
 
 	if (params.freqs == NULL && wpa_s->manual_sched_scan_freqs) {
 		wpa_dbg(wpa_s, MSG_DEBUG, "Limit sched scan to specified channels");
@@ -2403,7 +2443,7 @@ int wpas_start_pno(struct wpa_supplicant *wpa_s)
 		}
 	}
 
-	ret = wpa_supplicant_start_sched_scan(wpa_s, &params, interval);
+	ret = wpa_supplicant_start_sched_scan(wpa_s, &params);
 	os_free(params.filter_ssids);
 	if (ret == 0)
 		wpa_s->pno = 1;
@@ -2488,3 +2528,113 @@ int wpas_mac_addr_rand_scan_set(struct wpa_supplicant *wpa_s,
 	wpa_s->mac_addr_rand_enable |= type;
 	return 0;
 }
+
+
+int wpas_sched_scan_plans_set(struct wpa_supplicant *wpa_s, const char *cmd)
+{
+	struct sched_scan_plan *scan_plans = NULL;
+	const char *token, *context = NULL;
+	size_t num = 0;
+
+	if (!cmd)
+		return -1;
+
+	while ((token = cstr_token(cmd, " ", &context))) {
+		int ret;
+		struct sched_scan_plan *scan_plan, *n;
+
+		n = os_realloc_array(scan_plans, num + 1, sizeof(*scan_plans));
+		if (!n)
+			goto fail;
+
+		scan_plans = n;
+		scan_plan = &scan_plans[num];
+		num++;
+
+		ret = sscanf(token, "%u:%u", &scan_plan->interval,
+			     &scan_plan->iterations);
+		if (ret <= 0 || ret > 2 || !scan_plan->interval) {
+			wpa_printf(MSG_ERROR,
+				   "Invalid sched scan plan input: %s", token);
+			goto fail;
+		}
+
+		if (!scan_plan->interval) {
+			wpa_printf(MSG_ERROR,
+				   "scan plan %zu: Interval cannot be zero",
+				   num);
+			goto fail;
+		}
+
+		if (scan_plan->interval > wpa_s->max_sched_scan_plan_interval) {
+			wpa_printf(MSG_WARNING,
+				   "scan plan %zu: Scan interval too long(%u), use the maximum allowed(%u)",
+				   num, scan_plan->interval,
+				   wpa_s->max_sched_scan_plan_interval);
+			scan_plan->interval =
+				wpa_s->max_sched_scan_plan_interval;
+		}
+
+		if (ret == 1) {
+			scan_plan->iterations = 0;
+			break;
+		}
+
+		if (!scan_plan->iterations) {
+			wpa_printf(MSG_ERROR,
+				   "scan plan %zu: Number of iterations cannot be zero",
+				   num);
+			goto fail;
+		}
+
+		if (scan_plan->iterations >
+		    wpa_s->max_sched_scan_plan_iterations) {
+			wpa_printf(MSG_WARNING,
+				   "scan plan %zu: Too many iterations(%u), use the maximum allowed(%u)",
+				   num, scan_plan->iterations,
+				   wpa_s->max_sched_scan_plan_iterations);
+			scan_plan->iterations =
+				wpa_s->max_sched_scan_plan_iterations;
+		}
+
+		wpa_printf(MSG_DEBUG,
+			   "scan plan %zu: interval=%u iterations=%u", num,
+			   scan_plan->interval, scan_plan->iterations);
+	}
+
+	if (!scan_plans) {
+		wpa_printf(MSG_ERROR, "Invalid scan plans entry");
+		goto fail;
+	}
+
+	if (cstr_token(cmd, " ", &context) || scan_plans[num - 1].iterations) {
+		wpa_printf(MSG_ERROR,
+			   "All scan plans but the last must specify a number of iterations");
+		goto fail;
+	}
+
+	wpa_printf(MSG_DEBUG, "scan plan %zu (last plan): interval=%u", num,
+		   scan_plans[num - 1].interval);
+
+	if (num > wpa_s->max_sched_scan_plans) {
+		wpa_printf(MSG_WARNING,
+			   "Too many scheduled scan plans (only %zu supported)",
+			   wpa_s->max_sched_scan_plans);
+		wpa_printf(MSG_WARNING,
+			   "Use only the first %zu scan plans, and the last one (in infinite loop)",
+			   wpa_s->max_sched_scan_plans - 1);
+		os_memcpy(&scan_plans[wpa_s->max_sched_scan_plans - 1],
+			  &scan_plans[num - 1], sizeof(*scan_plans));
+		num = wpa_s->max_sched_scan_plans;
+	}
+
+	os_free(wpa_s->sched_scan_plans);
+	wpa_s->sched_scan_plans = scan_plans;
+	wpa_s->sched_scan_plans_num = num;
+	return 0;
+
+fail:
+	os_free(scan_plans);
+	wpa_printf(MSG_ERROR, "invalid scan plans list");
+	return -1;
+}
diff --git a/wpa_supplicant/scan.h b/wpa_supplicant/scan.h
index 7650f5a..9385ef2 100644
--- a/wpa_supplicant/scan.h
+++ b/wpa_supplicant/scan.h
@@ -40,8 +40,7 @@ void scan_only_handler(struct wpa_supplicant *wpa_s,
 		       struct wpa_scan_results *scan_res);
 int wpas_scan_scheduled(struct wpa_supplicant *wpa_s);
 int wpa_supplicant_start_sched_scan(struct wpa_supplicant *wpa_s,
-				    struct wpa_driver_scan_params *params,
-				    int interval);
+				    struct wpa_driver_scan_params *params);
 int wpa_supplicant_stop_sched_scan(struct wpa_supplicant *wpa_s);
 struct wpa_driver_scan_params *
 wpa_scan_clone_params(const struct wpa_driver_scan_params *src);
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 7631a79..520b7c6 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -545,6 +545,10 @@ static void wpa_supplicant_cleanup(struct wpa_supplicant *wpa_s)
 	}
 
 	wmm_ac_notify_disassoc(wpa_s);
+
+	wpa_s->sched_scan_plans_num = 0;
+	os_free(wpa_s->sched_scan_plans);
+	wpa_s->sched_scan_plans = NULL;
 }
 
 
@@ -4527,6 +4531,11 @@ static int wpa_supplicant_init_iface(struct wpa_supplicant *wpa_s,
 		wpa_s->probe_resp_offloads = capa.probe_resp_offloads;
 		wpa_s->max_scan_ssids = capa.max_scan_ssids;
 		wpa_s->max_sched_scan_ssids = capa.max_sched_scan_ssids;
+		wpa_s->max_sched_scan_plans = capa.max_sched_scan_plans;
+		wpa_s->max_sched_scan_plan_interval =
+			capa.max_sched_scan_plan_interval;
+		wpa_s->max_sched_scan_plan_iterations =
+			capa.max_sched_scan_plan_iterations;
 		wpa_s->sched_scan_supported = capa.sched_scan_supported;
 		wpa_s->max_match_sets = capa.max_match_sets;
 		wpa_s->max_remain_on_chan = capa.max_remain_on_chan;
@@ -4666,6 +4675,8 @@ static int wpa_supplicant_init_iface(struct wpa_supplicant *wpa_s,
 
 	wpas_rrm_reset(wpa_s);
 
+
+	wpas_sched_scan_plans_set(wpa_s, wpa_s->conf->sched_scan_plans);
 	return 0;
 }
 
diff --git a/wpa_supplicant/wpa_supplicant.conf b/wpa_supplicant/wpa_supplicant.conf
index bcb6247..8ce4a93 100644
--- a/wpa_supplicant/wpa_supplicant.conf
+++ b/wpa_supplicant/wpa_supplicant.conf
@@ -315,6 +315,8 @@ fast_reauth=1
 # For periodic module, parameters would be <fixed interval>
 #autoscan=periodic:30
 # So a delay of 30 seconds will be applied between each scan
+# Note that if sched_scan_plans are configured and supported by
+# the driver, autoscan is ignored.
 
 # filter_ssids - SSID-based scan result filtering
 # 0 = do not filter scan results (default)
@@ -616,6 +618,22 @@ fast_reauth=1
 # Hotspot 2.0
 # hs20=1
 
+# Scheduled scan plans
+# A space delimited list of scan plans. Each scan plan specifies the scan
+# interval and number of iterations, delimited by a colon. The last scan plan
+# will run infinitely and thus must specify only the interval and not the number
+# of iterations.
+# The driver advertises the maximum number of scan plans supported. If more scan
+# plans than supported are configured, only the first ones are set (up to the
+# maximum supported). The last scan plan that specifies only the interval is
+# always set as the last plan.
+# If the scan interval or the number of iterations for a scan plan exceeds the
+# maximum supported, it will be set to the maximum supported value.
+# Format:
+# sched_scan_plans=<interval:iterations> <interval:iterations> ... <interval>
+# Example:
+# sched_scan_plans=10:100 20:200 30
+
 # network block
 #
 # Each network (usually AP's sharing the same SSID) is configured as a separate
diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
index 5caa63e..d8d6c53 100644
--- a/wpa_supplicant/wpa_supplicant_i.h
+++ b/wpa_supplicant/wpa_supplicant_i.h
@@ -511,9 +511,10 @@ struct wpa_supplicant {
 
 	struct wpa_ssid *prev_sched_ssid; /* last SSID used in sched scan */
 	int sched_scan_timeout;
-	int sched_scan_interval;
 	int first_sched_scan;
 	int sched_scan_timed_out;
+	struct sched_scan_plan *sched_scan_plans;
+	size_t sched_scan_plans_num;
 
 	void (*scan_res_handler)(struct wpa_supplicant *wpa_s,
 				 struct wpa_scan_results *scan_res);
@@ -645,6 +646,9 @@ struct wpa_supplicant {
 
 	int max_scan_ssids;
 	int max_sched_scan_ssids;
+	size_t max_sched_scan_plans;
+	unsigned int max_sched_scan_plan_interval;
+	unsigned int max_sched_scan_plan_iterations;
 	int sched_scan_supported;
 	unsigned int max_match_sets;
 	unsigned int max_remain_on_chan;
@@ -1179,4 +1183,5 @@ void fst_wpa_supplicant_fill_iface_obj(struct wpa_supplicant *wpa_s,
 
 #endif /* CONFIG_FST */
 
+int wpas_sched_scan_plans_set(struct wpa_supplicant *wpa_s, const char *cmd);
 #endif /* WPA_SUPPLICANT_I_H */
-- 
1.9.1



From itprosenior at welho.com  Tue Nov 17 01:08:44 2015
From: itprosenior at welho.com (=?UTF-8?Q?Pertti_Niinim=C3=A4ki?=)
Date: Tue, 17 Nov 2015 11:08:44 +0200
Subject: Hostapd AP SSID broadcast problem
Message-ID: <A324F64E0A9E41F7B2BD790EFA576790@T520>

Hi
Based on WireShark analysis, I have not been able to configure Hostapd to 
broadcast SSID. My problem
is ?sleeping? remote IP security camera connected via Wifi to Raspberry Pi. 
Only ARP records are sent
out periodically or when pinging the bridged static IP address for the 
camera, but no SSID broadcasting.
Wifi is in its own subnet bridged (br0) to Raspberry and mobile PPP0 
interface.
In the same installation but nor directly connected the SSID from  ZyXEL 
ADSL modem can be listened correctly
with Raspberry's  WireShark.

I compiled latest version (hostapd v2.3)  into Raspberry, replacing v1.0, 
but it  didn?t change anything.
Testing  hostapd.conf setup for ?ignore_broadcast_ssid? with different 
values was no help either
for the problem.
Looking into source code, it seems like value ?1? should do the trick to 
beacon ssid, but no success?
Following are  config parameters used:
interface_wlan0
bridge=br0
driver=nl80211
hw_mode=g
channel=8
ssid=XxXxXX (not shown)
beacon_int=100 (ok with hostapd > 15)
dtim_period=2
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=(0 or 1 or 2 or 3 tested)
wpa=2
wpa_passphrase=xxxxxxxxxx(not shown)
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
country_code=FI
wpa_ptk_rekey=18000
radius_acct_interim_interval=36000 (not needed extra ?)

The driver is:  rt2800usb

Normally the the link Wifi-IPS camera works ok, but probably due to some 
disturbance the camera
may be dropped out. I want to test if broadcasting AP SSID could wake it up.

Pertti Niinim?ki
itprosenior at welho.com




From kabel at blackhole.sk  Sun Nov 15 17:21:54 2015
From: kabel at blackhole.sk (=?UTF-8?q?Marek=20Beh=C3=BAn?=)
Date: Mon, 16 Nov 2015 02:21:54 +0100
Subject: [PATCH] Check for LIBRESSL_VERSION_NUMBER in tls_openssl.c
Message-ID: <1447636914-8904-1-git-send-email-kabel@blackhole.sk>

LibreSSL does not yet support the new API, so do not use it
when LIBRESSL_VERSION_NUMBER macro is defined.
---
 src/crypto/tls_openssl.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c
index c2bb8c5..3883465 100644
--- a/src/crypto/tls_openssl.c
+++ b/src/crypto/tls_openssl.c
@@ -3163,7 +3163,7 @@ static int tls_parse_pkcs12(struct tls_data *data, SSL *ssl, PKCS12 *p12,
 	}
 
 	if (certs) {
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
+#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
 		SSL_clear_chain_certs(ssl);
 		while ((cert = sk_X509_pop(certs)) != NULL) {
 			X509_NAME_oneline(X509_get_subject_name(cert), buf,
@@ -3746,7 +3746,7 @@ int tls_connection_get_random(void *ssl_ctx, struct tls_connection *conn,
 	if (conn == NULL || keys == NULL)
 		return -1;
 	ssl = conn->ssl;
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
 	if (ssl == NULL || ssl->s3 == NULL || ssl->session == NULL)
 		return -1;
 
@@ -3775,7 +3775,7 @@ int tls_connection_get_random(void *ssl_ctx, struct tls_connection *conn,
 #ifndef CONFIG_FIPS
 static int openssl_get_keyblock_size(SSL *ssl)
 {
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
 	const EVP_CIPHER *c;
 	const EVP_MD *h;
 	int md_size;
@@ -3845,7 +3845,7 @@ static int openssl_tls_prf(struct tls_connection *conn,
 		   "mode");
 	return -1;
 #else /* CONFIG_FIPS */
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
 	SSL *ssl;
 	u8 *rnd;
 	int ret = -1;
@@ -4328,7 +4328,7 @@ int tls_connection_set_cipher_list(void *tls_ctx, struct tls_connection *conn,
 
 	wpa_printf(MSG_DEBUG, "OpenSSL: cipher suites: %s", buf + 1);
 
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
 #if defined(EAP_FAST) || defined(EAP_FAST_DYNAMIC) || defined(EAP_SERVER_FAST)
 	if (os_strstr(buf, ":ADH-")) {
 		/*
@@ -4917,7 +4917,7 @@ static int tls_sess_sec_cb(SSL *s, void *secret, int *secret_len,
 	struct tls_connection *conn = arg;
 	int ret;
 
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
 	if (conn == NULL || conn->session_ticket_cb == NULL)
 		return 0;
 
-- 
2.4.10



From alex.epert at gmail.com  Tue Nov 17 07:13:36 2015
From: alex.epert at gmail.com (Alexandre Epert)
Date: Tue, 17 Nov 2015 16:13:36 +0100
Subject: Hostapd AP SSID broadcast problem
In-Reply-To: <A324F64E0A9E41F7B2BD790EFA576790@T520>
References: <A324F64E0A9E41F7B2BD790EFA576790@T520>
Message-ID: <CAB0c3LU=zaDbZ=BDrRNszfL-=U0XWn_m9Q1uDyo3QiX7kgb0FQ@mail.gmail.com>

Hi,

If I understand you have 1 camera which is not working when you try to
hide SSID.

Have you tried your conf without "ignore_broadcast_ssid" option?
Do you have this problem with 1 equipment or more?

I use this hostapd.conf file :

interface=wlan0
bridge=br0
#hw_mode=g
channel=6
ieee80211d=1
country_code=FR
ieee80211n=1
#ieee80211ac=1
wmm_enabled=1
ignore_broadcast_ssid=0
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=Whatever

I can hide SSID if need to with that configuration file.


Regards,

Alex

2015-11-17 10:08 GMT+01:00 Pertti Niinim?ki <itprosenior at welho.com>:
> Hi
> Based on WireShark analysis, I have not been able to configure Hostapd to
> broadcast SSID. My problem
> is ?sleeping? remote IP security camera connected via Wifi to Raspberry Pi.
> Only ARP records are sent
> out periodically or when pinging the bridged static IP address for the
> camera, but no SSID broadcasting.
> Wifi is in its own subnet bridged (br0) to Raspberry and mobile PPP0
> interface.
> In the same installation but nor directly connected the SSID from  ZyXEL
> ADSL modem can be listened correctly
> with Raspberry's  WireShark.
>
> I compiled latest version (hostapd v2.3)  into Raspberry, replacing v1.0,
> but it  didn?t change anything.
> Testing  hostapd.conf setup for ?ignore_broadcast_ssid? with different
> values was no help either
> for the problem.
> Looking into source code, it seems like value ?1? should do the trick to
> beacon ssid, but no success?
> Following are  config parameters used:
> interface_wlan0
> bridge=br0
> driver=nl80211
> hw_mode=g
> channel=8
> ssid=XxXxXX (not shown)
> beacon_int=100 (ok with hostapd > 15)
> dtim_period=2
> macaddr_acl=0
> auth_algs=1
> ignore_broadcast_ssid=(0 or 1 or 2 or 3 tested)
> wpa=2
> wpa_passphrase=xxxxxxxxxx(not shown)
> wpa_key_mgmt=WPA-PSK
> wpa_pairwise=TKIP
> rsn_pairwise=CCMP
> country_code=FI
> wpa_ptk_rekey=18000
> radius_acct_interim_interval=36000 (not needed extra ?)
>
> The driver is:  rt2800usb
>
> Normally the the link Wifi-IPS camera works ok, but probably due to some
> disturbance the camera
> may be dropped out. I want to test if broadcasting AP SSID could wake it up.
>
> Pertti Niinim?ki
> itprosenior at welho.com
>
>
>
> _______________________________________________
> Hostap mailing list
> Hostap at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/hostap


From j at w1.fi  Tue Nov 17 09:53:10 2015
From: j at w1.fi (Jouni Malinen)
Date: Tue, 17 Nov 2015 19:53:10 +0200
Subject: [PATCH] Dbus : Freeing the message after message send in
 InvitationReceived signal
In-Reply-To: <1143289692.129481447741197430.JavaMail.weblogic@ep2mlwas08d>
References: <1143289692.129481447741197430.JavaMail.weblogic@ep2mlwas08d>
Message-ID: <20151117175310.GA30414@w1.fi>

On Tue, Nov 17, 2015 at 06:19:57AM +0000, MAYANK HAARIT wrote:
> Freeing the message after message send in wpas_dbus_signal_p2p_invitation_received()

Thanks, applied.
 
-- 
Jouni Malinen                                            PGP id EFC895FA


From itprosenior at welho.com  Tue Nov 17 11:38:34 2015
From: itprosenior at welho.com (=?UTF-8?Q?Pertti_Niinim=C3=A4ki?=)
Date: Tue, 17 Nov 2015 21:38:34 +0200
Subject: Hostapd AP SSID broadcast problem
In-Reply-To: <CAB0c3LU=zaDbZ=BDrRNszfL-=U0XWn_m9Q1uDyo3QiX7kgb0FQ@mail.gmail.com>
References: <A324F64E0A9E41F7B2BD790EFA576790@T520>
 <CAB0c3LU=zaDbZ=BDrRNszfL-=U0XWn_m9Q1uDyo3QiX7kgb0FQ@mail.gmail.com>
Message-ID: <5DFB5F06122E4B38A4D12CBE598DD21D@T520>

Hi Alex,

Thanks for your comments. Yes I have only one wireless camera at the moment. 
Remote location
(my cottage) is about 100 km away, so that I'm currently operating 
everything from my home location.
As you suggested I tested hostapd.conf commenting out 
"ignore_broadcast_ssid" but it didn't
change the broadcast behaviour.

Some other things I found from debug data using "-d" argument. Debug records 
are showing
beacon hex data and voila, SSID is correctly inserted in.
The problem seems to be that this specific beacon data is not sent out. Only 
records AP is sending
out are identified as ARP queries not containing SSID.
When I'm comparing that with  trace from ZyXEL ADSL router,  it is 
transmitting ARP queries and also
identified as 802.11 records which contain AP's SSID identification.

I'm not fully sure if my IPS camera is waking up when it sees correct Access 
Point, but that's what
I still believe.

For my remote operations I have  ZyXEL ADSL-router with Wifi option, two 
Raspberry Pi's as
LAN network, other one having internet connection with WWAN mobile stick.
If something is down I can use backup routes.

Regards
Pertti N


-----Alkuper?inen viesti----- 
From: Alexandre Epert
Sent: Tuesday, November 17, 2015 5:13 PM
To: Pertti Niinim?ki
Cc: hostap at lists.infradead.org
Subject: Re: Hostapd AP SSID broadcast problem

Hi,

If I understand you have 1 camera which is not working when you try to
hide SSID.

Have you tried your conf without "ignore_broadcast_ssid" option?
Do you have this problem with 1 equipment or more?

I use this hostapd.conf file :

interface=wlan0
bridge=br0
#hw_mode=g
channel=6
ieee80211d=1
country_code=FR
ieee80211n=1
#ieee80211ac=1
wmm_enabled=1
ignore_broadcast_ssid=0
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=Whatever

I can hide SSID if need to with that configuration file.


Regards,

Alex

2015-11-17 10:08 GMT+01:00 Pertti Niinim?ki <itprosenior at welho.com>:
> Hi
> Based on WireShark analysis, I have not been able to configure Hostapd to
> broadcast SSID. My problem
> is ?sleeping? remote IP security camera connected via Wifi to Raspberry 
> Pi.
> Only ARP records are sent
> out periodically or when pinging the bridged static IP address for the
> camera, but no SSID broadcasting.
> Wifi is in its own subnet bridged (br0) to Raspberry and mobile PPP0
> interface.
> In the same installation but nor directly connected the SSID from  ZyXEL
> ADSL modem can be listened correctly
> with Raspberry's  WireShark.
>
> I compiled latest version (hostapd v2.3)  into Raspberry, replacing v1.0,
> but it  didn?t change anything.
> Testing  hostapd.conf setup for ?ignore_broadcast_ssid? with different
> values was no help either
> for the problem.
> Looking into source code, it seems like value ?1? should do the trick to
> beacon ssid, but no success?
> Following are  config parameters used:
> interface_wlan0
> bridge=br0
> driver=nl80211
> hw_mode=g
> channel=8
> ssid=XxXxXX (not shown)
> beacon_int=100 (ok with hostapd > 15)
> dtim_period=2
> macaddr_acl=0
> auth_algs=1
> ignore_broadcast_ssid=(0 or 1 or 2 or 3 tested)
> wpa=2
> wpa_passphrase=xxxxxxxxxx(not shown)
> wpa_key_mgmt=WPA-PSK
> wpa_pairwise=TKIP
> rsn_pairwise=CCMP
> country_code=FI
> wpa_ptk_rekey=18000
> radius_acct_interim_interval=36000 (not needed extra ?)
>
> The driver is:  rt2800usb
>
> Normally the the link Wifi-IPS camera works ok, but probably due to some
> disturbance the camera
> may be dropped out. I want to test if broadcasting AP SSID could wake it 
> up.
>
> Pertti Niinim?ki
> itprosenior at welho.com
>
>
>
> _______________________________________________
> Hostap mailing list
> Hostap at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/hostap 



From itprosenior at welho.com  Tue Nov 17 12:13:39 2015
From: itprosenior at welho.com (=?UTF-8?Q?Pertti_Niinim=C3=A4ki?=)
Date: Tue, 17 Nov 2015 22:13:39 +0200
Subject: Fw: Hostapd AP SSID broadcast problem
Message-ID: <DE12C6422694490290C142F85DBC5E28@T520>

Hi Alex,

Just trying to be bit more clear, I'm want that hostapd is sending SSID out 
to
"everybody willing to listen" -  so I do not want to hide or eliminate it.
I can patch and compile Hostapd if there is any trick to make it happen.
>From the hostapd.conf point of view, I began to wonder if broadcasting of
SSID is the option not available in Hostapd?

Regards
Pertti N



-----Alkuper?inen viesti----- 
From: Pertti Niinim?ki
Sent: Tuesday, November 17, 2015 9:38 PM
To: Alexandre Epert
Cc: hostap at lists.infradead.org
Subject: Re: Hostapd AP SSID broadcast problem

Hi Alex,

Thanks for your comments. Yes I have only one wireless camera at the moment.
Remote location
(my cottage) is about 100 km away, so that I'm currently operating
everything from my home location.
As you suggested I tested hostapd.conf commenting out
"ignore_broadcast_ssid" but it didn't
change the broadcast behaviour.

Some other things I found from debug data using "-d" argument. Debug records
are showing
beacon hex data and voila, SSID is correctly inserted in.
The problem seems to be that this specific beacon data is not sent out. Only
records AP is sending
out are identified as ARP queries not containing SSID.
When I'm comparing that with  trace from ZyXEL ADSL router,  it is
transmitting ARP queries and also
identified as 802.11 records which contain AP's SSID identification.

I'm not fully sure if my IPS camera is waking up when it sees correct Access
Point, but that's what
I still believe.

For my remote operations I have  ZyXEL ADSL-router with Wifi option, two
Raspberry Pi's as
LAN network, other one having internet connection with WWAN mobile stick.
If something is down I can use backup routes.

Regards
Pertti N


-----Alkuper?inen viesti----- 
From: Alexandre Epert
Sent: Tuesday, November 17, 2015 5:13 PM
To: Pertti Niinim?ki
Cc: hostap at lists.infradead.org
Subject: Re: Hostapd AP SSID broadcast problem

Hi,

If I understand you have 1 camera which is not working when you try to
hide SSID.

Have you tried your conf without "ignore_broadcast_ssid" option?
Do you have this problem with 1 equipment or more?

I use this hostapd.conf file :

interface=wlan0
bridge=br0
#hw_mode=g
channel=6
ieee80211d=1
country_code=FR
ieee80211n=1
#ieee80211ac=1
wmm_enabled=1
ignore_broadcast_ssid=0
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=Whatever

I can hide SSID if need to with that configuration file.


Regards,

Alex

2015-11-17 10:08 GMT+01:00 Pertti Niinim?ki <itprosenior at welho.com>:
> Hi
> Based on WireShark analysis, I have not been able to configure Hostapd to
> broadcast SSID. My problem
> is ?sleeping? remote IP security camera connected via Wifi to Raspberry 
> Pi.
> Only ARP records are sent
> out periodically or when pinging the bridged static IP address for the
> camera, but no SSID broadcasting.
> Wifi is in its own subnet bridged (br0) to Raspberry and mobile PPP0
> interface.
> In the same installation but nor directly connected the SSID from  ZyXEL
> ADSL modem can be listened correctly
> with Raspberry's  WireShark.
>
> I compiled latest version (hostapd v2.3)  into Raspberry, replacing v1.0,
> but it  didn?t change anything.
> Testing  hostapd.conf setup for ?ignore_broadcast_ssid? with different
> values was no help either
> for the problem.
> Looking into source code, it seems like value ?1? should do the trick to
> beacon ssid, but no success?
> Following are  config parameters used:
> interface_wlan0
> bridge=br0
> driver=nl80211
> hw_mode=g
> channel=8
> ssid=XxXxXX (not shown)
> beacon_int=100 (ok with hostapd > 15)
> dtim_period=2
> macaddr_acl=0
> auth_algs=1
> ignore_broadcast_ssid=(0 or 1 or 2 or 3 tested)
> wpa=2
> wpa_passphrase=xxxxxxxxxx(not shown)
> wpa_key_mgmt=WPA-PSK
> wpa_pairwise=TKIP
> rsn_pairwise=CCMP
> country_code=FI
> wpa_ptk_rekey=18000
> radius_acct_interim_interval=36000 (not needed extra ?)
>
> The driver is:  rt2800usb
>
> Normally the the link Wifi-IPS camera works ok, but probably due to some
> disturbance the camera
> may be dropped out. I want to test if broadcasting AP SSID could wake it 
> up.
>
> Pertti Niinim?ki
> itprosenior at welho.com
>
>
>
> _______________________________________________
> Hostap mailing list
> Hostap at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/hostap 



From michael-dev at fami-braun.de  Wed Nov 18 03:43:15 2015
From: michael-dev at fami-braun.de (M. Braun)
Date: Wed, 18 Nov 2015 12:43:15 +0100
Subject: Fw: Hostapd AP SSID broadcast problem
In-Reply-To: <DE12C6422694490290C142F85DBC5E28@T520>
References: <DE12C6422694490290C142F85DBC5E28@T520>
Message-ID: <564C6453.8010609@fami-braun.de>

Hi,

if you don't see any beacons or management frames but data frames, you
might not be sniffing properly. Beacons are always sent out in AP mode,
regardless of whether ssid hiding is enabled or not. Data frames do not
carry SSID.

Regards,
 M. Braun

Am 17.11.2015 um 21:13 schrieb Pertti Niinim?ki:
> Hi Alex,
> 
> Just trying to be bit more clear, I'm want that hostapd is sending SSID
> out to
> "everybody willing to listen" -  so I do not want to hide or eliminate it.
> I can patch and compile Hostapd if there is any trick to make it happen.
> From the hostapd.conf point of view, I began to wonder if broadcasting of
> SSID is the option not available in Hostapd?
> 
> Regards
> Pertti N
> 
> 
> 
> -----Alkuper?inen viesti----- From: Pertti Niinim?ki
> Sent: Tuesday, November 17, 2015 9:38 PM
> To: Alexandre Epert
> Cc: hostap at lists.infradead.org
> Subject: Re: Hostapd AP SSID broadcast problem
> 
> Hi Alex,
> 
> Thanks for your comments. Yes I have only one wireless camera at the
> moment.
> Remote location
> (my cottage) is about 100 km away, so that I'm currently operating
> everything from my home location.
> As you suggested I tested hostapd.conf commenting out
> "ignore_broadcast_ssid" but it didn't
> change the broadcast behaviour.
> 
> Some other things I found from debug data using "-d" argument. Debug
> records
> are showing
> beacon hex data and voila, SSID is correctly inserted in.
> The problem seems to be that this specific beacon data is not sent out.
> Only
> records AP is sending
> out are identified as ARP queries not containing SSID.
> When I'm comparing that with  trace from ZyXEL ADSL router,  it is
> transmitting ARP queries and also
> identified as 802.11 records which contain AP's SSID identification.
> 
> I'm not fully sure if my IPS camera is waking up when it sees correct
> Access
> Point, but that's what
> I still believe.
> 
> For my remote operations I have  ZyXEL ADSL-router with Wifi option, two
> Raspberry Pi's as
> LAN network, other one having internet connection with WWAN mobile stick.
> If something is down I can use backup routes.
> 
> Regards
> Pertti N
> 
> 
> -----Alkuper?inen viesti----- From: Alexandre Epert
> Sent: Tuesday, November 17, 2015 5:13 PM
> To: Pertti Niinim?ki
> Cc: hostap at lists.infradead.org
> Subject: Re: Hostapd AP SSID broadcast problem
> 
> Hi,
> 
> If I understand you have 1 camera which is not working when you try to
> hide SSID.
> 
> Have you tried your conf without "ignore_broadcast_ssid" option?
> Do you have this problem with 1 equipment or more?
> 
> I use this hostapd.conf file :
> 
> interface=wlan0
> bridge=br0
> #hw_mode=g
> channel=6
> ieee80211d=1
> country_code=FR
> ieee80211n=1
> #ieee80211ac=1
> wmm_enabled=1
> ignore_broadcast_ssid=0
> ctrl_interface=/var/run/hostapd
> ctrl_interface_group=0
> ssid=Whatever
> 
> I can hide SSID if need to with that configuration file.
> 
> 
> Regards,
> 
> Alex
> 
> 2015-11-17 10:08 GMT+01:00 Pertti Niinim?ki <itprosenior at welho.com>:
>> Hi
>> Based on WireShark analysis, I have not been able to configure Hostapd to
>> broadcast SSID. My problem
>> is ?sleeping? remote IP security camera connected via Wifi to
>> Raspberry Pi.
>> Only ARP records are sent
>> out periodically or when pinging the bridged static IP address for the
>> camera, but no SSID broadcasting.
>> Wifi is in its own subnet bridged (br0) to Raspberry and mobile PPP0
>> interface.
>> In the same installation but nor directly connected the SSID from  ZyXEL
>> ADSL modem can be listened correctly
>> with Raspberry's  WireShark.
>>
>> I compiled latest version (hostapd v2.3)  into Raspberry, replacing v1.0,
>> but it  didn?t change anything.
>> Testing  hostapd.conf setup for ?ignore_broadcast_ssid? with different
>> values was no help either
>> for the problem.
>> Looking into source code, it seems like value ?1? should do the trick to
>> beacon ssid, but no success?
>> Following are  config parameters used:
>> interface_wlan0
>> bridge=br0
>> driver=nl80211
>> hw_mode=g
>> channel=8
>> ssid=XxXxXX (not shown)
>> beacon_int=100 (ok with hostapd > 15)
>> dtim_period=2
>> macaddr_acl=0
>> auth_algs=1
>> ignore_broadcast_ssid=(0 or 1 or 2 or 3 tested)
>> wpa=2
>> wpa_passphrase=xxxxxxxxxx(not shown)
>> wpa_key_mgmt=WPA-PSK
>> wpa_pairwise=TKIP
>> rsn_pairwise=CCMP
>> country_code=FI
>> wpa_ptk_rekey=18000
>> radius_acct_interim_interval=36000 (not needed extra ?)
>>
>> The driver is:  rt2800usb
>>
>> Normally the the link Wifi-IPS camera works ok, but probably due to some
>> disturbance the camera
>> may be dropped out. I want to test if broadcasting AP SSID could wake
>> it up.
>>
>> Pertti Niinim?ki
>> itprosenior at welho.com
>>
>>
>>
>> _______________________________________________
>> Hostap mailing list
>> Hostap at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/hostap 
> 
> 
> _______________________________________________
> Hostap mailing list
> Hostap at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/hostap


From itprosenior at welho.com  Wed Nov 18 06:34:00 2015
From: itprosenior at welho.com (=?utf-8?Q?Pertti_Niinim=C3=A4ki?=)
Date: Wed, 18 Nov 2015 16:34:00 +0200
Subject: Hostapd AP SSID broadcast problem
In-Reply-To: <564C6453.8010609@fami-braun.de>
Message-ID: <432C3C3487AD4D0DB91017B56F42ED7B@T520>

Hi Michael,

I think my sniffer (WireShark) is catching all the traffic coming out from 
the AP
including management frames and data. As a setup sniffer is listening wlan0 
and mon.wlan0
interfaces in promiscuous mode.

During my testing there is no data traffic at all, if I keep my other AP 
(ZyXel modem/router/wifi)
not connected to any client. In that case I can see polling records from 
ZyXel, including ARP queries
and 802.11 type queries.
ZyXEL 802.11 polling?s are including correct SSID from this Access Point.
Same time interleaved with  this ZyXEL AP queries  my  Raspberry Pi/Hostapd 
is sending out ARP polling queries
(only mac and IP addresses included) but never those bit longer 802.11 
queries,
which are containing among other things SSID of the broadcasting AP.

>From the Hostap source code I?ve been trying to identify, which are the 
preconditions and timing
for 802.11 type broadcast beacons, but so far without success.

Thank you for your attention - any comments are really welcome .

Regards
Pertti Niinim?ki

ps. Some problems with plain text messages (not HTML) and keeping message 
thread
together :) 



From j at w1.fi  Wed Nov 18 07:44:23 2015
From: j at w1.fi (Jouni Malinen)
Date: Wed, 18 Nov 2015 17:44:23 +0200
Subject: Hostapd AP SSID broadcast problem
In-Reply-To: <432C3C3487AD4D0DB91017B56F42ED7B@T520>
References: <564C6453.8010609@fami-braun.de>
 <432C3C3487AD4D0DB91017B56F42ED7B@T520>
Message-ID: <20151118154423.GA24005@w1.fi>

On Wed, Nov 18, 2015 at 04:34:00PM +0200, Pertti Niinim?ki wrote:
> From the Hostap source code I?ve been trying to identify, which are
> the preconditions and timing
> for 802.11 type broadcast beacons, but so far without success.

hostapd does not actually transmit the Beacon frames. It provides a
frame template to the kernel (driver or 802.11 stack) and the actual
transmission is coordinated by the WLAN driver (and/or firmware).

With some drivers (e.g., most drivers using mac80211), hostapd takes
care of Probe Request frame processing and sending of the Probe Response
frames (which have similar information to the Beacon frames).

-- 
Jouni Malinen                                            PGP id EFC895FA


From itprosenior at welho.com  Wed Nov 18 09:59:04 2015
From: itprosenior at welho.com (=?utf-8?Q?Pertti_Niinim=C3=A4ki?=)
Date: Wed, 18 Nov 2015 19:59:04 +0200
Subject: Hostapd AP SSID broadcast problem
Message-ID: <5565355B0F104155BAACC3D6F9BBFD6B@T520>

Thanks a lot - kiitos!
That was clear and exact answer to my question and problem.  I couldn?t
find any help from internet referring to this Beacon frames transmission
differences.
The adapter used is Ralink based Wi-PI dongle. It is using automatically
RT2800USB device driver.
Originally I had  driver option in hostapd.conf as driver=nl80211 (kernel 
interface ?)
Yesterday I did some fiddling with driver options and restarts.
Lsmod command is now  showing  mac80211 as loaded driver,
even current config  still specifies nl80211?

What is best ? last night my  remote location wifi IPS camera been has woken 
up and
WORKS after more than one week.
May be there is some race condition which driver is picked up. Anyway 
mac80211
seems to correct? I have to study this a bit more.
Thank you for the help ? Hostap seems to be robust and versatile software.
I?m now much more aware of its capabilities.

Regards
Pertti Niinim?ki





-----Alkuper?inen viesti----- 
From: Jouni Malinen
Sent: Wednesday, November 18, 2015 5:44 PM
To: PerttiNiinim?ki
Cc: hostap at lists.infradead.org ; michael-dev at fami-braun.de
Subject: Re: Hostapd AP SSID broadcast problem

On Wed, Nov 18, 2015 at 04:34:00PM +0200, Pertti Niinim?ki wrote:
> From the Hostap source code I?ve been trying to identify, which are
> the preconditions and timing
> for 802.11 type broadcast beacons, but so far without success.

hostapd does not actually transmit the Beacon frames. It provides a
frame template to the kernel (driver or 802.11 stack) and the actual
transmission is coordinated by the WLAN driver (and/or firmware).

With some drivers (e.g., most drivers using mac80211), hostapd takes
care of Probe Request frame processing and sending of the Probe Response
frames (which have similar information to the Beacon frames).

-- 
Jouni Malinen                                            PGP id EFC895FA 



From matteo at openwrt.org  Thu Nov 19 07:43:17 2015
From: matteo at openwrt.org (Matteo Croce)
Date: Thu, 19 Nov 2015 16:43:17 +0100
Subject: [PATCH] hostapd: add command to ban a station
Message-ID: <1447947797-18183-1-git-send-email-matteo@openwrt.org>

---
 hostapd/config_file.c  |  8 --------
 hostapd/ctrl_iface.c   |  3 +++
 hostapd/hostapd_cli.c  | 19 +++++++++++++++++++
 src/ap/ap_config.c     | 10 ++++++++--
 src/ap/ap_config.h     |  1 +
 src/ap/ctrl_iface_ap.c | 25 +++++++++++++++++++++++++
 src/ap/ctrl_iface_ap.h |  2 ++
 7 files changed, 58 insertions(+), 10 deletions(-)

diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index bf42466..36432f4 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -109,14 +109,6 @@ static int hostapd_config_read_vlan_file(struct hostapd_bss_config *bss,
 #endif /* CONFIG_NO_VLAN */
 
 
-static int hostapd_acl_comp(const void *a, const void *b)
-{
-	const struct mac_acl_entry *aa = a;
-	const struct mac_acl_entry *bb = b;
-	return os_memcmp(aa->addr, bb->addr, sizeof(macaddr));
-}
-
-
 static int hostapd_config_read_maclist(const char *fname,
 				       struct mac_acl_entry **acl, int *num)
 {
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
index cb6fb17..5ad29c8 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -2122,6 +2122,9 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
 	} else if (os_strncmp(buf, "DISASSOCIATE ", 13) == 0) {
 		if (hostapd_ctrl_iface_disassociate(hapd, buf + 13))
 			reply_len = -1;
+	} else if (os_strncmp(buf, "BAN ", 4) == 0) {
+		if (hostapd_ctrl_iface_ban(hapd, buf + 4))
+			reply_len = -1;
 	} else if (os_strcmp(buf, "STOP_AP") == 0) {
 		if (hostapd_ctrl_iface_stop_ap(hapd))
 			reply_len = -1;
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
index 46c2f37..f063a90 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -65,6 +65,7 @@ static const char *const commands_help =
 "   new_sta <addr>       add a new station\n"
 "   deauthenticate <addr>  deauthenticate a station\n"
 "   disassociate <addr>  disassociate a station\n"
+"   ban <addr>           ban a station\n"
 #ifdef CONFIG_IEEE80211W
 "   sa_query <addr>      send SA Query to a station\n"
 #endif /* CONFIG_IEEE80211W */
@@ -348,6 +349,23 @@ static int hostapd_cli_cmd_disassociate(struct wpa_ctrl *ctrl, int argc,
 }
 
 
+static int hostapd_cli_cmd_ban(struct wpa_ctrl *ctrl, int argc,
+					  char *argv[])
+{
+	char buf[64];
+	if (argc < 1) {
+		printf("Invalid 'ban' command - exactly one "
+		       "argument, STA address, is required.\n");
+		return -1;
+	}
+	if (argc > 1)
+		os_snprintf(buf, sizeof(buf), "BAN %s %s",
+			    argv[0], argv[1]);
+	else
+		os_snprintf(buf, sizeof(buf), "BAN %s", argv[0]);
+	return wpa_ctrl_command(ctrl, buf);
+}
+
 #ifdef CONFIG_IEEE80211W
 static int hostapd_cli_cmd_sa_query(struct wpa_ctrl *ctrl, int argc,
 				    char *argv[])
@@ -1083,6 +1101,7 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
 	{ "new_sta", hostapd_cli_cmd_new_sta },
 	{ "deauthenticate", hostapd_cli_cmd_deauthenticate },
 	{ "disassociate", hostapd_cli_cmd_disassociate },
+	{ "ban", hostapd_cli_cmd_ban },
 #ifdef CONFIG_IEEE80211W
 	{ "sa_query", hostapd_cli_cmd_sa_query },
 #endif /* CONFIG_IEEE80211W */
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
index cf9b2ce..0b0c93c 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -201,11 +201,17 @@ int hostapd_mac_comp(const void *a, const void *b)
 	return os_memcmp(a, b, sizeof(macaddr));
 }
 
-
 int hostapd_mac_comp_empty(const void *a)
 {
 	macaddr empty = { 0 };
-	return os_memcmp(a, empty, sizeof(macaddr));
+	return hostapd_mac_comp(a, empty);
+}
+
+int hostapd_acl_comp(const void *a, const void *b)
+{
+	const struct mac_acl_entry *aa = a;
+	const struct mac_acl_entry *bb = b;
+	return hostapd_mac_comp(aa->addr, bb->addr);
 }
 
 
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
index ff9dcb0..e165408 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
@@ -680,6 +680,7 @@ struct hostapd_config {
 
 int hostapd_mac_comp(const void *a, const void *b);
 int hostapd_mac_comp_empty(const void *a);
+int hostapd_acl_comp(const void *a, const void *b);
 struct hostapd_config * hostapd_config_defaults(void);
 void hostapd_config_defaults_bss(struct hostapd_bss_config *bss);
 void hostapd_config_free_eap_user(struct hostapd_eap_user *user);
diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
index c98978f..b804661 100644
--- a/src/ap/ctrl_iface_ap.c
+++ b/src/ap/ctrl_iface_ap.c
@@ -408,6 +408,31 @@ int hostapd_ctrl_iface_disassociate(struct hostapd_data *hapd,
 	return 0;
 }
 
+int hostapd_ctrl_iface_ban(struct hostapd_data *hapd,
+			   const char *txtaddr)
+{
+	u8 addr[ETH_ALEN];
+	struct mac_acl_entry *acl = hapd->conf->deny_mac;
+	int num_acl = hapd->conf->num_deny_mac + 1;
+
+	wpa_dbg(hapd->msg_ctx, MSG_DEBUG, "CTRL_IFACE BAN %s",
+		txtaddr);
+
+	if (hwaddr_aton(txtaddr, addr))
+		return -1;
+
+	hapd->conf->macaddr_acl = 0;
+
+	acl = os_realloc_array(acl, num_acl, sizeof(*acl));
+	os_memcpy(acl[num_acl - 1].addr, addr, ETH_ALEN);
+	acl[num_acl - 1].vlan_id = 0;
+	qsort(acl, num_acl, sizeof(*acl), hostapd_acl_comp);
+
+	hapd->conf->deny_mac = acl;
+	hapd->conf->num_deny_mac = num_acl;
+
+	return hostapd_ctrl_iface_disassociate(hapd, txtaddr);
+}
 
 int hostapd_ctrl_iface_status(struct hostapd_data *hapd, char *buf,
 			      size_t buflen)
diff --git a/src/ap/ctrl_iface_ap.h b/src/ap/ctrl_iface_ap.h
index e5297d0..c6801bf 100644
--- a/src/ap/ctrl_iface_ap.h
+++ b/src/ap/ctrl_iface_ap.h
@@ -19,6 +19,8 @@ int hostapd_ctrl_iface_deauthenticate(struct hostapd_data *hapd,
 				      const char *txtaddr);
 int hostapd_ctrl_iface_disassociate(struct hostapd_data *hapd,
 				    const char *txtaddr);
+int hostapd_ctrl_iface_ban(struct hostapd_data *hapd,
+				    const char *txtaddr);
 int hostapd_ctrl_iface_status(struct hostapd_data *hapd, char *buf,
 			      size_t buflen);
 int hostapd_parse_csa_settings(const char *pos,
-- 
2.5.0



From j at w1.fi  Thu Nov 19 14:17:31 2015
From: j at w1.fi (Jouni Malinen)
Date: Fri, 20 Nov 2015 00:17:31 +0200
Subject: minimum code footprint for wpa_supplicant (STA, AP & P2P)
In-Reply-To: <C298D3796A1F7748A33B68640945355224A977C5@DFRE01.ent.ti.com>
References: <C298D3796A1F7748A33B68640945355224A977C5@DFRE01.ent.ti.com>
Message-ID: <20151119221731.GB18312@w1.fi>

On Tue, Nov 17, 2015 at 09:22:00AM +0000, Tzoreff, Yaniv wrote:
> We would like to use the hostap and the wpa_supplicant in specific in order to activate STA, AP and P2P. 
> For STA, we would like to support all kind of encryption methods. 
> For AP, we don't need to have enterprise security capabilities. 

If you do not need enterprise security, I'm not sure why you would use
hostapd here when the goal is to minimize binary size. You'll need
wpa_supplicant with AP mode support anyway for P2P, so could use
wpa_supplicant for the non-P2P AP case as well.

> 1. Can you please specify which files are must for these requirements (we are currently using WPA_supplicant files with some additions from hostapd, but I am not sure it is needed, please see attachment with files list we are using)? Should we add/remove any from the list? 

wpa_supplicant/Makefile picks the files automatically based on build
configuration in wpa_supplicant/.config. If you need to build this using
some other tools, the easiest way to figure out the list of files is
likely to run a Linux build with suitable build configuration and see
what got pulled in into the build.

> 2. Are there any defines/configurations you can recommend to change in order to minimize the WPA_supplicant without degrading any basic capability (I realize basic is amorphous)? 

There has not really been much of an attempt to minimize size of the P2P
and WPS implementation, so for the set of features you listed, this is
not going to be very small without quite a bit of additional effort to
remove (sub)features that you may not need. Anyway, you could get
started by running a Linux build with make in the wpa_supplicant
directory with this in wpa_supplicant/.config:

CONFIG_NO_STDOUT_DEBUG=y
CONFIG_NO_CONFIG_WRITE=y
CFLAGS += -Os
CONFIG_TLS=internal
CONFIG_INTERNAL_LIBTOMMATH=y
CONFIG_P2P=y

> 3. Are there any other methods/ideas for minimizing .bss or .text of wpa_supplicant? 

There's quite a bit of extensions in both WPS and P2P that you might not
need for the specific use case you are considering here. However, this
would currently require going through the relevant files and commenting
out the unnecessary capabilities since the build options are available
only for enabling all of P2P support.

CONFIG_NO_STDOUT_DEBUG=y gets rid of quite a few debug strings, but not
p2p_dbg(), so in src/p2p_i.h, you may want to do something like this if
you don't care about debugging possibilities:
#define p2p_dbg(p2p, fmt, args...) do {} while(0)

-- 
Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Fri Nov 20 00:39:17 2015
From: j at w1.fi (Jouni Malinen)
Date: Fri, 20 Nov 2015 10:39:17 +0200
Subject: [PATCH] hostapd: add command to ban a station
In-Reply-To: <1447947797-18183-1-git-send-email-matteo@openwrt.org>
References: <1447947797-18183-1-git-send-email-matteo@openwrt.org>
Message-ID: <20151120083917.GA3476@w1.fi>

On Thu, Nov 19, 2015 at 04:43:17PM +0100, Matteo Croce wrote:
> ---

Please provide a more complete commit message describing the added
function and add a Signed-off-by: line as described in the top level
CONTRIBUTIONS file so that I can apply this.

> diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
> @@ -65,6 +65,7 @@ static const char *const commands_help =
> +"   ban <addr>           ban a station\n"

> @@ -348,6 +349,23 @@ static int hostapd_cli_cmd_disassociate(struct wpa_ctrl *ctrl, int argc,
> +static int hostapd_cli_cmd_ban(struct wpa_ctrl *ctrl, int argc,
> +					  char *argv[])
> +{
> +	char buf[64];
> +	if (argc < 1) {
> +		printf("Invalid 'ban' command - exactly one "
> +		       "argument, STA address, is required.\n");
> +		return -1;
> +	}
> +	if (argc > 1)
> +		os_snprintf(buf, sizeof(buf), "BAN %s %s",
> +			    argv[0], argv[1]);

What is the purpose of allowing two arguments if the command is
documented as requiring exactly one argument?

> diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
> @@ -408,6 +408,31 @@ int hostapd_ctrl_iface_disassociate(struct hostapd_data *hapd,
> +int hostapd_ctrl_iface_ban(struct hostapd_data *hapd,
> +			   const char *txtaddr)
> +{
> +	u8 addr[ETH_ALEN];
> +	struct mac_acl_entry *acl = hapd->conf->deny_mac;
> +	int num_acl = hapd->conf->num_deny_mac + 1;

> +	hapd->conf->macaddr_acl = 0;
> +
> +	acl = os_realloc_array(acl, num_acl, sizeof(*acl));
> +	os_memcpy(acl[num_acl - 1].addr, addr, ETH_ALEN);

Need to verify whether os_realloc_array() returns NULL and if so, keep
in mind that the old allocation is still valid. This construction here
would result in memory leak followed by NULL pointer dereference
crashing the program if that reallocation were to fail.
 
-- 
Jouni Malinen                                            PGP id EFC895FA


From david.luyens at gmail.com  Fri Nov 20 02:31:44 2015
From: david.luyens at gmail.com (David Luyens)
Date: Fri, 20 Nov 2015 11:31:44 +0100
Subject: openwrt configuration
In-Reply-To: <CAH_-dtz1BX9b_fzUHLeKJUH-eq+tKgp=BzVUcy1QE80cGFJYaw@mail.gmail.com>
References: <CAH_-dtz1BX9b_fzUHLeKJUH-eq+tKgp=BzVUcy1QE80cGFJYaw@mail.gmail.com>
Message-ID: <CAH_-dtx8GRbm8ctbRCM8TcbbtPEW-147ft564WGUerxajDiDbw@mail.gmail.com>

Hi, I am trying to setup a hostapd on openwrt router, but it seems
that some specific options are not recognised.

root at OpenWrt:/# hostapd_cli -v
hostapd_cli v2.5-devel
Copyright (c) 2004-2015, Jouni Malinen <j at w1.fi> and contributors




root at OpenWrt:/# /usr/sbin/hostapd -P /var/run/wifi-phy1.pid -B
/var/run/hostapd-phy1.conf
Configuration file: /var/run/hostapd-phy1.conf
Line 38: unknown configuration item 'interworking'
Line 39: unknown configuration item 'internet'
Line 40: unknown configuration item 'asra'
Line 41: unknown configuration item 'network_auth_type'
Line 42: unknown configuration item 'nai_realm'
Line 43: unknown configuration item 'anqp_3gpp_cell_net'
6 errors found in configuration file '/var/run/hostapd-phy1.conf'
Failed to set up interface with /var/run/hostapd-phy1.conf
Failed to initialize interface



root at OpenWrt:/# cat /var/run/hostapd-phy1.conf
driver=nl80211
logger_syslog=127
logger_syslog_level=2
logger_stdout=127
logger_stdout_level=2
hw_mode=a
channel=36
ieee80211n=1
ht_coex=0
ht_capab=[LDPC][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][DSSS_CCK-40]

interface=wlan1
ctrl_interface=/var/run/hostapd
disassoc_low_ack=1
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
uapsd_advertisement_enabled=1
auth_server_addr=10.57.23.84
auth_server_port=1812
auth_server_shared_secret=EAPsecret
acct_server_addr=10.57.23.84
acct_server_port=1813
acct_server_shared_secret=EAPsecret
eapol_key_index_workaround=1
ieee8021x=1
auth_algs=1
wpa=2
wpa_pairwise=CCMP
ssid=EAPtest
bridge=br-lan
nas_identifier=EAPap
wpa_key_mgmt=WPA-EAP
okc=0
disable_pmksa_caching=1
bssid=60:e3:27:b8:21:ca
interworking=1
internet=1
asra=1
network_auth_type=00
nai_realm=0,mytest.com,18:[5:1][5:2]
anqp_3gpp_cell_net=206,01;206,10;206,20;206,05



Any idea what could be wrong?

David


From j at w1.fi  Fri Nov 20 03:21:55 2015
From: j at w1.fi (Jouni Malinen)
Date: Fri, 20 Nov 2015 13:21:55 +0200
Subject: openwrt configuration
In-Reply-To: <CAH_-dtx8GRbm8ctbRCM8TcbbtPEW-147ft564WGUerxajDiDbw@mail.gmail.com>
References: <CAH_-dtz1BX9b_fzUHLeKJUH-eq+tKgp=BzVUcy1QE80cGFJYaw@mail.gmail.com>
 <CAH_-dtx8GRbm8ctbRCM8TcbbtPEW-147ft564WGUerxajDiDbw@mail.gmail.com>
Message-ID: <20151120112155.GA21329@w1.fi>

On Fri, Nov 20, 2015 at 11:31:44AM +0100, David Luyens wrote:
> Hi, I am trying to setup a hostapd on openwrt router, but it seems
> that some specific options are not recognised.

> root at OpenWrt:/# /usr/sbin/hostapd -P /var/run/wifi-phy1.pid -B
> /var/run/hostapd-phy1.conf
> Configuration file: /var/run/hostapd-phy1.conf
> Line 38: unknown configuration item 'interworking'
> Line 39: unknown configuration item 'internet'
> Line 40: unknown configuration item 'asra'
> Line 41: unknown configuration item 'network_auth_type'
> Line 42: unknown configuration item 'nai_realm'
> Line 43: unknown configuration item 'anqp_3gpp_cell_net'

Those parameters are available only if hostapd has been built with
Interworking support enabled (CONFIG_INTERWORKING=y in hostapd/.config).

-- 
Jouni Malinen                                            PGP id EFC895FA


From matteo at openwrt.org  Sat Nov 21 05:01:00 2015
From: matteo at openwrt.org (Matteo Croce)
Date: Sat, 21 Nov 2015 14:01:00 +0100
Subject: [PATCH] hostapd: add command to ban a station
In-Reply-To: <20151120083917.GA3476@w1.fi>
References: <1447947797-18183-1-git-send-email-matteo@openwrt.org>
 <20151120083917.GA3476@w1.fi>
Message-ID: <CAFnufp0trWCdGePkRy1jSmYBzCggTQOrC3Dv7ST0K_81smwhJg@mail.gmail.com>

2015-11-20 9:39 GMT+01:00 Jouni Malinen <j at w1.fi>:
> On Thu, Nov 19, 2015 at 04:43:17PM +0100, Matteo Croce wrote:
>> ---
>
> Please provide a more complete commit message describing the added
> function and add a Signed-off-by: line as described in the top level
> CONTRIBUTIONS file so that I can apply this.

Yes, I will do in the next patch

>> diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
>> @@ -65,6 +65,7 @@ static const char *const commands_help =
>> +"   ban <addr>           ban a station\n"
>
>> @@ -348,6 +349,23 @@ static int hostapd_cli_cmd_disassociate(struct wpa_ctrl *ctrl, int argc,
>> +static int hostapd_cli_cmd_ban(struct wpa_ctrl *ctrl, int argc,
>> +                                       char *argv[])
>> +{
>> +     char buf[64];
>> +     if (argc < 1) {
>> +             printf("Invalid 'ban' command - exactly one "
>> +                    "argument, STA address, is required.\n");
>> +             return -1;
>> +     }
>> +     if (argc > 1)
>> +             os_snprintf(buf, sizeof(buf), "BAN %s %s",
>> +                         argv[0], argv[1]);
>
> What is the purpose of allowing two arguments if the command is
> documented as requiring exactly one argument?

I just copied from hostapd_cli_cmd_disassociate and
hostapd_cli_cmd_deauthenticate
they does teh same

>> diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
>> @@ -408,6 +408,31 @@ int hostapd_ctrl_iface_disassociate(struct hostapd_data *hapd,
>> +int hostapd_ctrl_iface_ban(struct hostapd_data *hapd,
>> +                        const char *txtaddr)
>> +{
>> +     u8 addr[ETH_ALEN];
>> +     struct mac_acl_entry *acl = hapd->conf->deny_mac;
>> +     int num_acl = hapd->conf->num_deny_mac + 1;
>
>> +     hapd->conf->macaddr_acl = 0;
>> +
>> +     acl = os_realloc_array(acl, num_acl, sizeof(*acl));
>> +     os_memcpy(acl[num_acl - 1].addr, addr, ETH_ALEN);
>
> Need to verify whether os_realloc_array() returns NULL and if so, keep
> in mind that the old allocation is still valid. This construction here
> would result in memory leak followed by NULL pointer dereference
> crashing the program if that reallocation were to fail.

Ok

> --
> Jouni Malinen                                            PGP id EFC895FA



-- 
Matteo Croce
OpenWrt Developer
  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 CHAOS CALMER (15.05)
 -----------------------------------------------------
  * 1 1/2 oz Gin            Shake with a glassful
  * 1/4 oz Triple Sec       of broken ice and pour
  * 3/4 oz Lime Juice       unstrained into a goblet.
  * 1 1/2 oz Orange Juice
  * 1 tsp. Grenadine Syrup
 -----------------------------------------------------


From j at w1.fi  Sat Nov 21 08:28:39 2015
From: j at w1.fi (Jouni Malinen)
Date: Sat, 21 Nov 2015 18:28:39 +0200
Subject: [PATCH 3/6] P2P: Set p2p_go_wait_client in invitation_result() cb
In-Reply-To: <1446560701-30841-4-git-send-email-ilan.peer@intel.com>
References: <1446560701-30841-1-git-send-email-ilan.peer@intel.com>
 <1446560701-30841-4-git-send-email-ilan.peer@intel.com>
Message-ID: <20151121162839.GA15961@w1.fi>

On Tue, Nov 03, 2015 at 04:24:58PM +0200, Ilan Peer wrote:
> When an invitation to join an existing group is accepted by the
> peer device, set p2p_go_wait_client to the current time so
> that wpas_p2p_in_progress() would return != 0, thus preventing
> P2P CSA, scanning etc., that would interfere with the peer
> device connection.

> diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
> @@ -3101,7 +3101,13 @@ static void wpas_invitation_result(void *ctx, int status, const u8 *bssid,
>  	if (wpa_s->pending_invite_ssid_id == -1) {
>  		if (status == P2P_SC_FAIL_UNKNOWN_GROUP)
>  			wpas_remove_persistent_client(wpa_s, peer);
> -		return; /* Invitation to active group */
> +
> +		/*
> +		 * Invitation to active group. Set the client wait, to allow
> +		 * provisioning and connection.
> +		 */
> +		os_get_reltime(&wpa_s->global->p2p_go_wait_client);
> +		return;
>  	}

Shouldn't this check for status == P2P_SC_SUCCESS to match that comment
about accepted invitation in the commit message? In addition to that,
this looks a bit confusing since this location can be reached both in GO
and P2P Client role in an existing group. I'd understand the GO case,
but setting p2p_go_wait_client on an interface that is in P2P Client
role would make this more difficult to understand.
 
-- 
Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Sat Nov 21 08:33:39 2015
From: j at w1.fi (Jouni Malinen)
Date: Sat, 21 Nov 2015 18:33:39 +0200
Subject: [PATCH 4/6] tests: Test no P2P GO move when invitation is in
 progress
In-Reply-To: <1446560701-30841-5-git-send-email-ilan.peer@intel.com>
References: <1446560701-30841-1-git-send-email-ilan.peer@intel.com>
 <1446560701-30841-5-git-send-email-ilan.peer@intel.com>
Message-ID: <20151121163339.GB15961@w1.fi>

On Tue, Nov 03, 2015 at 04:24:59PM +0200, Ilan Peer wrote:
> Add a test to verify that a P2P GO does not start a CSA
> once invitation signalling is done, and the P2P client is
> about to connect.

Could you please clarify how this is supposed to work? The long wait for
CSA seems to be completed before starting the invitation and there is no
checks for CSA after the invitation is started.

-- 
Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Sat Nov 21 11:07:09 2015
From: j at w1.fi (Jouni Malinen)
Date: Sat, 21 Nov 2015 21:07:09 +0200
Subject: [PATCH 0/6] Few bug fixes
In-Reply-To: <1446560701-30841-1-git-send-email-ilan.peer@intel.com>
References: <1446560701-30841-1-git-send-email-ilan.peer@intel.com>
Message-ID: <20151121190709.GA9353@w1.fi>

Thanks, applied patches 1-2 and 5-6; waiting for changes or more details
on patches 3-4.

-- 
Jouni Malinen                                            PGP id EFC895FA


From ilan.peer at intel.com  Sun Nov 22 00:55:03 2015
From: ilan.peer at intel.com (Peer, Ilan)
Date: Sun, 22 Nov 2015 08:55:03 +0000
Subject: [PATCH 3/6] P2P: Set p2p_go_wait_client in invitation_result() cb
In-Reply-To: <20151121162839.GA15961@w1.fi>
References: <1446560701-30841-1-git-send-email-ilan.peer@intel.com>
 <1446560701-30841-4-git-send-email-ilan.peer@intel.com>
 <20151121162839.GA15961@w1.fi>
Message-ID: <CB3B3D4774441E42AA3EA0E1BA8230A04DC6B093@HASMSX110.ger.corp.intel.com>

> -----Original Message-----
> From: Jouni Malinen [mailto:j at w1.fi]
> Sent: Saturday, November 21, 2015 18:29
> To: Peer, Ilan
> Cc: hostap at lists.infradead.org
> Subject: Re: [PATCH 3/6] P2P: Set p2p_go_wait_client in invitation_result() cb
> 
> On Tue, Nov 03, 2015 at 04:24:58PM +0200, Ilan Peer wrote:
> > When an invitation to join an existing group is accepted by the peer
> > device, set p2p_go_wait_client to the current time so that
> > wpas_p2p_in_progress() would return != 0, thus preventing P2P CSA,
> > scanning etc., that would interfere with the peer device connection.
> 
> > diff --git a/wpa_supplicant/p2p_supplicant.c
> > b/wpa_supplicant/p2p_supplicant.c @@ -3101,7 +3101,13 @@ static void
> wpas_invitation_result(void *ctx, int status, const u8 *bssid,
> >  	if (wpa_s->pending_invite_ssid_id == -1) {
> >  		if (status == P2P_SC_FAIL_UNKNOWN_GROUP)
> >  			wpas_remove_persistent_client(wpa_s, peer);
> > -		return; /* Invitation to active group */
> > +
> > +		/*
> > +		 * Invitation to active group. Set the client wait, to allow
> > +		 * provisioning and connection.
> > +		 */
> > +		os_get_reltime(&wpa_s->global->p2p_go_wait_client);
> > +		return;
> >  	}
> 
> Shouldn't this check for status == P2P_SC_SUCCESS to match that comment
> about accepted invitation in the commit message? In addition to that, this
> looks a bit confusing since this location can be reached both in GO and P2P
> Client role in an existing group. I'd understand the GO case, but setting
> p2p_go_wait_client on an interface that is in P2P Client role would make this
> more difficult to understand.
> 

Yes. Will fix.

Thanks,

Ilan.


From pali.rohar at gmail.com  Sat Nov 21 17:02:54 2015
From: pali.rohar at gmail.com (=?UTF-8?q?Pali=20Roh=C3=A1r?=)
Date: Sun, 22 Nov 2015 02:02:54 +0100
Subject: [PATCH 0/4] TLS client: Improve certificate validation
Message-ID: <1448154178-17670-1-git-send-email-pali.rohar@gmail.com>

This patch series implements hash://server/sha256/cert_hash_in_hex syntax for
ca_cert property, correctly skip validation if ca_cert is not specified and
implements validation for certificate with SHA384 and SHA512 hashes.

Pali Roh?r (4):
  TLS client: Do not verify CA certificates when ca_cert is not
    specified
  TLS client: Add support for validating server certificate
  Crypto: Add SHA384 and SHA512 implementation from LibTomCrypt library
  TLS client: Validate certificates with SHA384 and SHA512 hashes

 src/crypto/Makefile          |    4 +-
 src/crypto/crypto.h          |   22 ++++
 src/crypto/sha384-internal.c |   92 ++++++++++++++
 src/crypto/sha384_i.h        |   23 ++++
 src/crypto/sha512-internal.c |  273 ++++++++++++++++++++++++++++++++++++++++++
 src/crypto/sha512_i.h        |   25 ++++
 src/tls/tlsv1_client_read.c  |   16 ++-
 src/tls/tlsv1_cred.c         |   27 +++++
 src/tls/tlsv1_cred.h         |    4 +
 src/tls/x509v3.c             |   66 +++++++++-
 wpa_supplicant/Makefile      |   10 ++
 11 files changed, 556 insertions(+), 6 deletions(-)
 create mode 100644 src/crypto/sha384-internal.c
 create mode 100644 src/crypto/sha384_i.h
 create mode 100644 src/crypto/sha512-internal.c
 create mode 100644 src/crypto/sha512_i.h

-- 
1.7.9.5



From pali.rohar at gmail.com  Sat Nov 21 17:02:58 2015
From: pali.rohar at gmail.com (=?UTF-8?q?Pali=20Roh=C3=A1r?=)
Date: Sun, 22 Nov 2015 02:02:58 +0100
Subject: [PATCH 4/4] TLS client: Validate certificates with SHA384 and SHA512
 hashes
In-Reply-To: <1448154178-17670-1-git-send-email-pali.rohar@gmail.com>
References: <1448154178-17670-1-git-send-email-pali.rohar@gmail.com>
Message-ID: <1448154178-17670-5-git-send-email-pali.rohar@gmail.com>

This commit adds support for validating certificates with SHA384 and SHA512
hashes. Those certificates are now very common so wpa_supplicant needs
support for them.

SHA384 and SHA512 hash functions are included in previous commit.

Signed-off-by: Pali Roh?r <pali.rohar at gmail.com>
---
 src/tls/x509v3.c        |   66 ++++++++++++++++++++++++++++++++++++++++++++---
 wpa_supplicant/Makefile |   10 +++++++
 2 files changed, 72 insertions(+), 4 deletions(-)

diff --git a/src/tls/x509v3.c b/src/tls/x509v3.c
index e7b7c41..39fa534 100644
--- a/src/tls/x509v3.c
+++ b/src/tls/x509v3.c
@@ -1448,7 +1448,7 @@ static int x509_sha1_oid(struct asn1_oid *oid)
 }
 
 
-static int x509_sha256_oid(struct asn1_oid *oid)
+static int x509_sha2_oid(struct asn1_oid *oid)
 {
 	return oid->len == 9 &&
 		oid->oid[0] == 2 /* joint-iso-itu-t */ &&
@@ -1458,11 +1458,31 @@ static int x509_sha256_oid(struct asn1_oid *oid)
 		oid->oid[4] == 101 /* gov */ &&
 		oid->oid[5] == 3 /* csor */ &&
 		oid->oid[6] == 4 /* nistAlgorithm */ &&
-		oid->oid[7] == 2 /* hashAlgs */ &&
+		oid->oid[7] == 2 /* hashAlgs */;
+}
+
+
+static int x509_sha256_oid(struct asn1_oid *oid)
+{
+	return x509_sha2_oid(oid) &&
 		oid->oid[8] == 1 /* sha256 */;
 }
 
 
+static int x509_sha384_oid(struct asn1_oid *oid)
+{
+	return x509_sha2_oid(oid) &&
+		oid->oid[8] == 2 /* sha384 */;
+}
+
+
+static int x509_sha512_oid(struct asn1_oid *oid)
+{
+	return x509_sha2_oid(oid) &&
+		oid->oid[8] == 3 /* sha512 */;
+}
+
+
 /**
  * x509_certificate_parse - Parse a X.509 certificate in DER format
  * @buf: Pointer to the X.509 certificate in DER format
@@ -1587,7 +1607,7 @@ int x509_certificate_check_signature(struct x509_certificate *issuer,
 	size_t data_len;
 	struct asn1_hdr hdr;
 	struct asn1_oid oid;
-	u8 hash[32];
+	u8 hash[128];
 	size_t hash_len;
 
 	if (!x509_pkcs_oid(&cert->signature.oid) ||
@@ -1699,6 +1719,32 @@ int x509_certificate_check_signature(struct x509_certificate *issuer,
 		goto skip_digest_oid;
 	}
 
+	if (x509_sha384_oid(&oid)) {
+		if (cert->signature.oid.oid[6] !=
+		    12 /* sha384WithRSAEncryption */) {
+			wpa_printf(MSG_DEBUG, "X509: digestAlgorithm SHA384 "
+				   "does not match with certificate "
+				   "signatureAlgorithm (%lu)",
+				   cert->signature.oid.oid[6]);
+			os_free(data);
+			return -1;
+		}
+		goto skip_digest_oid;
+	}
+
+	if (x509_sha512_oid(&oid)) {
+		if (cert->signature.oid.oid[6] !=
+		    13 /* sha512WithRSAEncryption */) {
+			wpa_printf(MSG_DEBUG, "X509: digestAlgorithm SHA512 "
+				   "does not match with certificate "
+				   "signatureAlgorithm (%lu)",
+				   cert->signature.oid.oid[6]);
+			os_free(data);
+			return -1;
+		}
+		goto skip_digest_oid;
+	}
+
 	if (!x509_digest_oid(&oid)) {
 		wpa_printf(MSG_DEBUG, "X509: Unrecognized digestAlgorithm");
 		os_free(data);
@@ -1764,9 +1810,21 @@ skip_digest_oid:
 		wpa_hexdump(MSG_MSGDUMP, "X509: Certificate hash (SHA256)",
 			    hash, hash_len);
 		break;
-	case 2: /* md2WithRSAEncryption */
 	case 12: /* sha384WithRSAEncryption */
+		sha384_vector(1, &cert->tbs_cert_start, &cert->tbs_cert_len,
+			      hash);
+		hash_len = 48;
+		wpa_hexdump(MSG_MSGDUMP, "X509: Certificate hash (SHA384)",
+			    hash, hash_len);
+		break;
 	case 13: /* sha512WithRSAEncryption */
+		sha512_vector(1, &cert->tbs_cert_start, &cert->tbs_cert_len,
+			      hash);
+		hash_len = 64;
+		wpa_hexdump(MSG_MSGDUMP, "X509: Certificate hash (SHA512)",
+			    hash, hash_len);
+		break;
+	case 2: /* md2WithRSAEncryption */
 	default:
 		wpa_printf(MSG_INFO, "X509: Unsupported certificate signature "
 			   "algorithm (%lu)", cert->signature.oid.oid[6]);
diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
index 86bdfc6..6a39d49 100644
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -1112,6 +1112,8 @@ CONFIG_INTERNAL_SHA1=y
 CONFIG_INTERNAL_MD4=y
 CONFIG_INTERNAL_MD5=y
 CONFIG_INTERNAL_SHA256=y
+CONFIG_INTERNAL_SHA384=y
+CONFIG_INTERNAL_SHA512=y
 CONFIG_INTERNAL_RC4=y
 CONFIG_INTERNAL_DH_GROUP5=y
 endif
@@ -1311,6 +1313,14 @@ CFLAGS += -DCONFIG_SHA384
 OBJS += ../src/crypto/sha384-prf.o
 endif
 
+ifdef CONFIG_INTERNAL_SHA384
+OBJS += ../src/crypto/sha384-internal.o
+endif
+
+ifdef CONFIG_INTERNAL_SHA512
+OBJS += ../src/crypto/sha512-internal.o
+endif
+
 ifdef NEED_DH_GROUPS
 OBJS += ../src/crypto/dh_groups.o
 endif
-- 
1.7.9.5



From pali.rohar at gmail.com  Sat Nov 21 17:02:55 2015
From: pali.rohar at gmail.com (=?UTF-8?q?Pali=20Roh=C3=A1r?=)
Date: Sun, 22 Nov 2015 02:02:55 +0100
Subject: [PATCH 1/4] TLS client: Do not verify CA certificates when ca_cert is
 not specified
In-Reply-To: <1448154178-17670-1-git-send-email-pali.rohar@gmail.com>
References: <1448154178-17670-1-git-send-email-pali.rohar@gmail.com>
Message-ID: <1448154178-17670-2-git-send-email-pali.rohar@gmail.com>

In documentation is written: "If ca_cert and ca_path are not included,
server certificate will not be verified". This is truth when wpa_supplicant
is compiled with OpenSSL library.

But when using internal TLS implementation and some certificates in CA
chain are in unsupported format (e.g. use SHA384 or SHA512 hash functions)
then verification fails even if ca_cert property is not specified.

This commit change behaviour and certificate verification in internal TLS
implementation is really skipped when ca_cert is not specified.

Signed-off-by: Pali Roh?r <pali.rohar at gmail.com>
---
 src/tls/tlsv1_client_read.c |    2 +-
 src/tls/tlsv1_cred.c        |    2 ++
 src/tls/tlsv1_cred.h        |    2 ++
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/tls/tlsv1_client_read.c b/src/tls/tlsv1_client_read.c
index 9ce9680..4fe9580 100644
--- a/src/tls/tlsv1_client_read.c
+++ b/src/tls/tlsv1_client_read.c
@@ -364,7 +364,7 @@ static int tls_process_certificate(struct tlsv1_client *conn, u8 ct,
 		pos += cert_len;
 	}
 
-	if (conn->cred &&
+	if (conn->cred && conn->cred->ca_cert_verify &&
 	    x509_certificate_chain_validate(conn->cred->trusted_certs, chain,
 					    &reason, conn->disable_time_checks)
 	    < 0) {
diff --git a/src/tls/tlsv1_cred.c b/src/tls/tlsv1_cred.c
index 1ea6827..fbac965 100644
--- a/src/tls/tlsv1_cred.c
+++ b/src/tls/tlsv1_cred.c
@@ -190,6 +190,8 @@ int tlsv1_set_ca_cert(struct tlsv1_credentials *cred, const char *cert,
 		      const u8 *cert_blob, size_t cert_blob_len,
 		      const char *path)
 {
+	cred->ca_cert_verify = cert || cert_blob || path;
+
 	if (tlsv1_set_cert_chain(&cred->trusted_certs, cert,
 				 cert_blob, cert_blob_len) < 0)
 		return -1;
diff --git a/src/tls/tlsv1_cred.h b/src/tls/tlsv1_cred.h
index 68fbdc9..b1e3e00 100644
--- a/src/tls/tlsv1_cred.h
+++ b/src/tls/tlsv1_cred.h
@@ -14,6 +14,8 @@ struct tlsv1_credentials {
 	struct x509_certificate *cert;
 	struct crypto_private_key *key;
 
+	unsigned int ca_cert_verify:1;
+
 	/* Diffie-Hellman parameters */
 	u8 *dh_p; /* prime */
 	size_t dh_p_len;
-- 
1.7.9.5



From pali.rohar at gmail.com  Sat Nov 21 17:02:56 2015
From: pali.rohar at gmail.com (=?UTF-8?q?Pali=20Roh=C3=A1r?=)
Date: Sun, 22 Nov 2015 02:02:56 +0100
Subject: [PATCH 2/4] TLS client: Add support for validating server certificate
In-Reply-To: <1448154178-17670-1-git-send-email-pali.rohar@gmail.com>
References: <1448154178-17670-1-git-send-email-pali.rohar@gmail.com>
Message-ID: <1448154178-17670-3-git-send-email-pali.rohar@gmail.com>

This commit adds support for "hash://server/sha256/cert_hash_in_hex" scheme
in ca_cert property for internal TLS implementation.

Signed-off-by: Pali Roh?r <pali.rohar at gmail.com>
---
 src/tls/tlsv1_client_read.c |   16 +++++++++++++++-
 src/tls/tlsv1_cred.c        |   25 +++++++++++++++++++++++++
 src/tls/tlsv1_cred.h        |    2 ++
 3 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/src/tls/tlsv1_client_read.c b/src/tls/tlsv1_client_read.c
index 4fe9580..56973c3 100644
--- a/src/tls/tlsv1_client_read.c
+++ b/src/tls/tlsv1_client_read.c
@@ -364,7 +364,21 @@ static int tls_process_certificate(struct tlsv1_client *conn, u8 ct,
 		pos += cert_len;
 	}
 
-	if (conn->cred && conn->cred->ca_cert_verify &&
+	if (conn->cred && conn->cred->server_cert_only && chain) {
+		u8 hash[32];
+		char buf[128];
+		wpa_printf(MSG_DEBUG, "TLSv1: Validate server certificate hash");
+		x509_name_string(&chain->subject, buf, sizeof(buf));
+		wpa_printf(MSG_DEBUG, "TLSv1: 0: %s", buf);
+		if (sha256_vector(1, &chain->cert_start, &chain->cert_len, hash) < 0 ||
+		    os_memcmp(conn->cred->srv_cert_hash, hash, 32) != 0) {
+			wpa_printf(MSG_DEBUG, "TLSv1: Server certificate hash mismatch");
+			wpa_hexdump(MSG_MSGDUMP, "TLSv1: SHA256 hash", hash, 32);
+			tls_alert(conn, TLS_ALERT_LEVEL_FATAL, TLS_ALERT_BAD_CERTIFICATE);
+			x509_certificate_chain_free(chain);
+			return -1;
+		}
+	} else if (conn->cred && conn->cred->ca_cert_verify &&
 	    x509_certificate_chain_validate(conn->cred->trusted_certs, chain,
 					    &reason, conn->disable_time_checks)
 	    < 0) {
diff --git a/src/tls/tlsv1_cred.c b/src/tls/tlsv1_cred.c
index fbac965..94a7246 100644
--- a/src/tls/tlsv1_cred.c
+++ b/src/tls/tlsv1_cred.c
@@ -190,6 +190,31 @@ int tlsv1_set_ca_cert(struct tlsv1_credentials *cred, const char *cert,
 		      const u8 *cert_blob, size_t cert_blob_len,
 		      const char *path)
 {
+	if (cert && os_strncmp(cert, "hash://", 7) == 0) {
+		const char *pos = cert + 7;
+		if (os_strncmp(pos, "server/sha256/", 14) != 0) {
+			wpa_printf(MSG_DEBUG, "TLSv1: Unsupported ca_cert "
+				   "hash value '%s'", cert);
+			return -1;
+		}
+		pos += 14;
+		if (os_strlen(pos) != 32 * 2) {
+			wpa_printf(MSG_DEBUG, "TLSv1: Unexpected SHA256 "
+				   "hash length in ca_cert '%s'", cert);
+			return -1;
+		}
+		if (hexstr2bin(pos, cred->srv_cert_hash, 32) < 0) {
+			wpa_printf(MSG_DEBUG, "TLSv1: Invalid SHA256 hash "
+				   "value in ca_cert '%s'", cert);
+			return -1;
+		}
+		cred->server_cert_only = 1;
+		cred->ca_cert_verify = 0;
+		wpa_printf(MSG_DEBUG, "TLSv1: Checking only server "
+			   "certificate match");
+		return 0;
+	}
+
 	cred->ca_cert_verify = cert || cert_blob || path;
 
 	if (tlsv1_set_cert_chain(&cred->trusted_certs, cert,
diff --git a/src/tls/tlsv1_cred.h b/src/tls/tlsv1_cred.h
index b1e3e00..ac72b8c 100644
--- a/src/tls/tlsv1_cred.h
+++ b/src/tls/tlsv1_cred.h
@@ -15,6 +15,8 @@ struct tlsv1_credentials {
 	struct crypto_private_key *key;
 
 	unsigned int ca_cert_verify:1;
+	unsigned int server_cert_only:1;
+	u8 srv_cert_hash[32];
 
 	/* Diffie-Hellman parameters */
 	u8 *dh_p; /* prime */
-- 
1.7.9.5



From pali.rohar at gmail.com  Sat Nov 21 17:02:57 2015
From: pali.rohar at gmail.com (=?UTF-8?q?Pali=20Roh=C3=A1r?=)
Date: Sun, 22 Nov 2015 02:02:57 +0100
Subject: [PATCH 3/4] Crypto: Add SHA384 and SHA512 implementation from
 LibTomCrypt library
In-Reply-To: <1448154178-17670-1-git-send-email-pali.rohar@gmail.com>
References: <1448154178-17670-1-git-send-email-pali.rohar@gmail.com>
Message-ID: <1448154178-17670-4-git-send-email-pali.rohar@gmail.com>

Signed-off-by: Pali Roh?r <pali.rohar at gmail.com>
---
 src/crypto/Makefile          |    4 +-
 src/crypto/crypto.h          |   22 ++++
 src/crypto/sha384-internal.c |   92 ++++++++++++++
 src/crypto/sha384_i.h        |   23 ++++
 src/crypto/sha512-internal.c |  273 ++++++++++++++++++++++++++++++++++++++++++
 src/crypto/sha512_i.h        |   25 ++++
 6 files changed, 438 insertions(+), 1 deletion(-)
 create mode 100644 src/crypto/sha384-internal.c
 create mode 100644 src/crypto/sha384_i.h
 create mode 100644 src/crypto/sha512-internal.c
 create mode 100644 src/crypto/sha512_i.h

diff --git a/src/crypto/Makefile b/src/crypto/Makefile
index 3e90350..d181e72 100644
--- a/src/crypto/Makefile
+++ b/src/crypto/Makefile
@@ -47,7 +47,9 @@ LIB_OBJS= \
 	sha256.o \
 	sha256-prf.o \
 	sha256-tlsprf.o \
-	sha256-internal.o
+	sha256-internal.o \
+	sha384-internal.o \
+	sha512-internal.o
 
 LIB_OBJS += crypto_internal.o
 LIB_OBJS += crypto_internal-cipher.o
diff --git a/src/crypto/crypto.h b/src/crypto/crypto.h
index 534c4bd..42ac899 100644
--- a/src/crypto/crypto.h
+++ b/src/crypto/crypto.h
@@ -80,6 +80,28 @@ int sha256_vector(size_t num_elem, const u8 *addr[], const size_t *len,
 		  u8 *mac);
 
 /**
+ * sha384_vector - SHA384 hash for data vector
+ * @num_elem: Number of elements in the data vector
+ * @addr: Pointers to the data areas
+ * @len: Lengths of the data blocks
+ * @mac: Buffer for the hash
+ * Returns: 0 on success, -1 on failure
+ */
+int sha384_vector(size_t num_elem, const u8 *addr[], const size_t *len,
+		  u8 *mac);
+
+/**
+ * sha512_vector - SHA512 hash for data vector
+ * @num_elem: Number of elements in the data vector
+ * @addr: Pointers to the data areas
+ * @len: Lengths of the data blocks
+ * @mac: Buffer for the hash
+ * Returns: 0 on success, -1 on failure
+ */
+int sha512_vector(size_t num_elem, const u8 *addr[], const size_t *len,
+		  u8 *mac);
+
+/**
  * des_encrypt - Encrypt one block with DES
  * @clear: 8 octets (in)
  * @key: 7 octets (in) (no parity bits included)
diff --git a/src/crypto/sha384-internal.c b/src/crypto/sha384-internal.c
new file mode 100644
index 0000000..646f729
--- /dev/null
+++ b/src/crypto/sha384-internal.c
@@ -0,0 +1,92 @@
+/*
+ * SHA-384 hash implementation and interface functions
+ * Copyright (c) 2015, Pali Roh?r <pali.rohar at gmail.com>
+ *
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
+ */
+
+#include "includes.h"
+
+#include "common.h"
+#include "sha384_i.h"
+#include "crypto.h"
+
+
+/**
+ * sha384_vector - SHA384 hash for data vector
+ * @num_elem: Number of elements in the data vector
+ * @addr: Pointers to the data areas
+ * @len: Lengths of the data blocks
+ * @mac: Buffer for the hash
+ * Returns: 0 on success, -1 of failure
+ */
+int sha384_vector(size_t num_elem, const u8 *addr[], const size_t *len,
+		  u8 *mac)
+{
+	struct sha384_state ctx;
+	size_t i;
+
+	sha384_init(&ctx);
+	for (i = 0; i < num_elem; i++)
+		if (sha384_process(&ctx, addr[i], len[i]))
+			return -1;
+	if (sha384_done(&ctx, mac))
+		return -1;
+	return 0;
+}
+
+
+/* ===== start - public domain SHA384 implementation ===== */
+
+/* This is based on SHA384 implementation in LibTomCrypt that was released into
+ * public domain by Tom St Denis. */
+
+#define CONST64(n) n ## ULL
+
+/**
+   Initialize the hash state
+   @param md   The hash state you wish to initialize
+   @return CRYPT_OK if successful
+*/
+void sha384_init(struct sha384_state *md)
+{
+	md->curlen = 0;
+	md->length = 0;
+	md->state[0] = CONST64(0xcbbb9d5dc1059ed8);
+	md->state[1] = CONST64(0x629a292a367cd507);
+	md->state[2] = CONST64(0x9159015a3070dd17);
+	md->state[3] = CONST64(0x152fecd8f70e5939);
+	md->state[4] = CONST64(0x67332667ffc00b31);
+	md->state[5] = CONST64(0x8eb44a8768581511);
+	md->state[6] = CONST64(0xdb0c2e0d64f98fa7);
+	md->state[7] = CONST64(0x47b5481dbefa4fa4);
+}
+
+int sha384_process(struct sha384_state *md, const unsigned char *in,
+		   unsigned long inlen)
+{
+	return sha512_process(md, in, inlen);
+}
+
+/**
+   Terminate the hash to get the digest
+   @param md  The hash state
+   @param out [out] The destination of the hash (48 bytes)
+   @return CRYPT_OK if successful
+*/
+int sha384_done(struct sha384_state *md, unsigned char *out)
+{
+	unsigned char buf[64];
+
+	if (md->curlen >= sizeof(md->buf))
+		return -1;
+
+	if (sha512_done(md, buf) != 0)
+		return -1;
+
+	os_memcpy(out, buf, 48);
+	return 0;
+}
+
+/* ===== end - public domain SHA384 implementation ===== */
diff --git a/src/crypto/sha384_i.h b/src/crypto/sha384_i.h
new file mode 100644
index 0000000..a00253f
--- /dev/null
+++ b/src/crypto/sha384_i.h
@@ -0,0 +1,23 @@
+/*
+ * SHA-384 internal definitions
+ * Copyright (c) 2015, Pali Roh?r <pali.rohar at gmail.com>
+ *
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
+ */
+
+#ifndef SHA384_I_H
+#define SHA384_I_H
+
+#include "sha512_i.h"
+
+#define SHA384_BLOCK_SIZE SHA512_BLOCK_SIZE
+
+#define sha384_state sha512_state
+
+void sha384_init(struct sha384_state *md);
+int sha384_process(struct sha384_state *md, const unsigned char *in,
+		   unsigned long inlen);
+int sha384_done(struct sha384_state *md, unsigned char *out);
+
+#endif /* SHA384_I_H */
diff --git a/src/crypto/sha512-internal.c b/src/crypto/sha512-internal.c
new file mode 100644
index 0000000..e950bd9
--- /dev/null
+++ b/src/crypto/sha512-internal.c
@@ -0,0 +1,273 @@
+/*
+ * SHA-512 hash implementation and interface functions
+ * Copyright (c) 2015, Pali Roh?r <pali.rohar at gmail.com>
+ *
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
+ */
+
+#include "includes.h"
+
+#include "common.h"
+#include "sha512_i.h"
+#include "crypto.h"
+
+
+/**
+ * sha512_vector - SHA512 hash for data vector
+ * @num_elem: Number of elements in the data vector
+ * @addr: Pointers to the data areas
+ * @len: Lengths of the data blocks
+ * @mac: Buffer for the hash
+ * Returns: 0 on success, -1 of failure
+ */
+int sha512_vector(size_t num_elem, const u8 *addr[], const size_t *len,
+		  u8 *mac)
+{
+	struct sha512_state ctx;
+	size_t i;
+
+	sha512_init(&ctx);
+	for (i = 0; i < num_elem; i++)
+		if (sha512_process(&ctx, addr[i], len[i]))
+			return -1;
+	if (sha512_done(&ctx, mac))
+		return -1;
+	return 0;
+}
+
+
+/* ===== start - public domain SHA512 implementation ===== */
+
+/* This is based on SHA512 implementation in LibTomCrypt that was released into
+ * public domain by Tom St Denis. */
+
+#define CONST64(n) n ## ULL
+
+/* the K array */
+static const u64 K[80] = {
+CONST64(0x428a2f98d728ae22), CONST64(0x7137449123ef65cd),
+CONST64(0xb5c0fbcfec4d3b2f), CONST64(0xe9b5dba58189dbbc),
+CONST64(0x3956c25bf348b538), CONST64(0x59f111f1b605d019),
+CONST64(0x923f82a4af194f9b), CONST64(0xab1c5ed5da6d8118),
+CONST64(0xd807aa98a3030242), CONST64(0x12835b0145706fbe),
+CONST64(0x243185be4ee4b28c), CONST64(0x550c7dc3d5ffb4e2),
+CONST64(0x72be5d74f27b896f), CONST64(0x80deb1fe3b1696b1),
+CONST64(0x9bdc06a725c71235), CONST64(0xc19bf174cf692694),
+CONST64(0xe49b69c19ef14ad2), CONST64(0xefbe4786384f25e3),
+CONST64(0x0fc19dc68b8cd5b5), CONST64(0x240ca1cc77ac9c65),
+CONST64(0x2de92c6f592b0275), CONST64(0x4a7484aa6ea6e483),
+CONST64(0x5cb0a9dcbd41fbd4), CONST64(0x76f988da831153b5),
+CONST64(0x983e5152ee66dfab), CONST64(0xa831c66d2db43210),
+CONST64(0xb00327c898fb213f), CONST64(0xbf597fc7beef0ee4),
+CONST64(0xc6e00bf33da88fc2), CONST64(0xd5a79147930aa725),
+CONST64(0x06ca6351e003826f), CONST64(0x142929670a0e6e70),
+CONST64(0x27b70a8546d22ffc), CONST64(0x2e1b21385c26c926),
+CONST64(0x4d2c6dfc5ac42aed), CONST64(0x53380d139d95b3df),
+CONST64(0x650a73548baf63de), CONST64(0x766a0abb3c77b2a8),
+CONST64(0x81c2c92e47edaee6), CONST64(0x92722c851482353b),
+CONST64(0xa2bfe8a14cf10364), CONST64(0xa81a664bbc423001),
+CONST64(0xc24b8b70d0f89791), CONST64(0xc76c51a30654be30),
+CONST64(0xd192e819d6ef5218), CONST64(0xd69906245565a910),
+CONST64(0xf40e35855771202a), CONST64(0x106aa07032bbd1b8),
+CONST64(0x19a4c116b8d2d0c8), CONST64(0x1e376c085141ab53),
+CONST64(0x2748774cdf8eeb99), CONST64(0x34b0bcb5e19b48a8),
+CONST64(0x391c0cb3c5c95a63), CONST64(0x4ed8aa4ae3418acb),
+CONST64(0x5b9cca4f7763e373), CONST64(0x682e6ff3d6b2b8a3),
+CONST64(0x748f82ee5defb2fc), CONST64(0x78a5636f43172f60),
+CONST64(0x84c87814a1f0ab72), CONST64(0x8cc702081a6439ec),
+CONST64(0x90befffa23631e28), CONST64(0xa4506cebde82bde9),
+CONST64(0xbef9a3f7b2c67915), CONST64(0xc67178f2e372532b),
+CONST64(0xca273eceea26619c), CONST64(0xd186b8c721c0c207),
+CONST64(0xeada7dd6cde0eb1e), CONST64(0xf57d4f7fee6ed178),
+CONST64(0x06f067aa72176fba), CONST64(0x0a637dc5a2c898a6),
+CONST64(0x113f9804bef90dae), CONST64(0x1b710b35131c471b),
+CONST64(0x28db77f523047d84), CONST64(0x32caab7b40c72493),
+CONST64(0x3c9ebe0a15c9bebc), CONST64(0x431d67c49c100d4c),
+CONST64(0x4cc5d4becb3e42b6), CONST64(0x597f299cfc657e2a),
+CONST64(0x5fcb6fab3ad6faec), CONST64(0x6c44198c4a475817)
+};
+
+/* Various logical functions */
+#define Ch(x,y,z)       (z ^ (x & (y ^ z)))
+#define Maj(x,y,z)      (((x | y) & z) | (x & y))
+#define S(x, n)         ROR64c(x, n)
+#define R(x, n)         (((x)&CONST64(0xFFFFFFFFFFFFFFFF))>>((u64)n))
+#define Sigma0(x)       (S(x, 28) ^ S(x, 34) ^ S(x, 39))
+#define Sigma1(x)       (S(x, 14) ^ S(x, 18) ^ S(x, 41))
+#define Gamma0(x)       (S(x, 1) ^ S(x, 8) ^ R(x, 7))
+#define Gamma1(x)       (S(x, 19) ^ S(x, 61) ^ R(x, 6))
+#ifndef MIN
+#define MIN(x, y) (((x) < (y)) ? (x) : (y))
+#endif
+
+#define LOAD64H(x, y)                                                      \
+   { x = (((u64)((y)[0] & 255))<<56)|(((u64)((y)[1] & 255))<<48) | \
+         (((u64)((y)[2] & 255))<<40)|(((u64)((y)[3] & 255))<<32) | \
+         (((u64)((y)[4] & 255))<<24)|(((u64)((y)[5] & 255))<<16) | \
+         (((u64)((y)[6] & 255))<<8)|(((u64)((y)[7] & 255))); }
+
+#define STORE64H(x, y)                                                                     \
+   { (y)[0] = (unsigned char)(((x)>>56)&255); (y)[1] = (unsigned char)(((x)>>48)&255);     \
+     (y)[2] = (unsigned char)(((x)>>40)&255); (y)[3] = (unsigned char)(((x)>>32)&255);     \
+     (y)[4] = (unsigned char)(((x)>>24)&255); (y)[5] = (unsigned char)(((x)>>16)&255);     \
+     (y)[6] = (unsigned char)(((x)>>8)&255); (y)[7] = (unsigned char)((x)&255); }
+
+#define ROR64c(x, y) \
+    ( ((((x)&CONST64(0xFFFFFFFFFFFFFFFF))>>((u64)(y)&CONST64(63))) | \
+      ((x)<<((u64)(64-((y)&CONST64(63)))))) & CONST64(0xFFFFFFFFFFFFFFFF))
+
+/* compress 1024-bits */
+static int sha512_compress(struct sha512_state *md, unsigned char *buf)
+{
+	u64 S[8], W[80], t0, t1;
+	int i;
+
+	/* copy state into S */
+	for (i = 0; i < 8; i++) {
+		S[i] = md->state[i];
+	}
+
+	/* copy the state into 1024-bits into W[0..15] */
+	for (i = 0; i < 16; i++) {
+		LOAD64H(W[i], buf + (8*i));
+	}
+
+	/* fill W[16..79] */
+	for (i = 16; i < 80; i++) {
+		W[i] = Gamma1(W[i - 2]) + W[i - 7] + Gamma0(W[i - 15]) + W[i - 16];
+	}
+
+	/* Compress */
+	for (i = 0; i < 80; i++) {
+		t0 = S[7] + Sigma1(S[4]) + Ch(S[4], S[5], S[6]) + K[i] + W[i];
+		t1 = Sigma0(S[0]) + Maj(S[0], S[1], S[2]);
+		S[7] = S[6];
+		S[6] = S[5];
+		S[5] = S[4];
+		S[4] = S[3] + t0;
+		S[3] = S[2];
+		S[2] = S[1];
+		S[1] = S[0];
+		S[0] = t0 + t1;
+	}
+
+	/* feedback */
+	for (i = 0; i < 8; i++) {
+		md->state[i] = md->state[i] + S[i];
+	}
+
+	return 0;
+}
+
+/**
+   Initialize the hash state
+   @param md   The hash state you wish to initialize
+   @return CRYPT_OK if successful
+*/
+void sha512_init(struct sha512_state *md)
+{
+	md->curlen = 0;
+	md->length = 0;
+	md->state[0] = CONST64(0x6a09e667f3bcc908);
+	md->state[1] = CONST64(0xbb67ae8584caa73b);
+	md->state[2] = CONST64(0x3c6ef372fe94f82b);
+	md->state[3] = CONST64(0xa54ff53a5f1d36f1);
+	md->state[4] = CONST64(0x510e527fade682d1);
+	md->state[5] = CONST64(0x9b05688c2b3e6c1f);
+	md->state[6] = CONST64(0x1f83d9abfb41bd6b);
+	md->state[7] = CONST64(0x5be0cd19137e2179);
+}
+
+/**
+   Process a block of memory though the hash
+   @param md     The hash state
+   @param in     The data to hash
+   @param inlen  The length of the data (octets)
+   @return CRYPT_OK if successful
+*/
+int sha512_process(struct sha512_state *md, const unsigned char *in,
+		   unsigned long inlen)
+{
+	unsigned long n;
+
+	if (md->curlen >= sizeof(md->buf))
+		return -1;
+
+	while (inlen > 0) {
+		if (md->curlen == 0 && inlen >= SHA512_BLOCK_SIZE) {
+			if (sha512_compress(md, (unsigned char *) in) < 0)
+				return -1;
+			md->length += SHA512_BLOCK_SIZE * 8;
+			in += SHA512_BLOCK_SIZE;
+			inlen -= SHA512_BLOCK_SIZE;
+		} else {
+			n = MIN(inlen, (SHA512_BLOCK_SIZE - md->curlen));
+			os_memcpy(md->buf + md->curlen, in, n);
+			md->curlen += n;
+			in += n;
+			inlen -= n;
+			if (md->curlen == SHA512_BLOCK_SIZE) {
+				if (sha512_compress(md, md->buf) < 0)
+					return -1;
+				md->length += 8 * SHA512_BLOCK_SIZE;
+				md->curlen = 0;
+			}
+		}
+	}
+
+	return 0;
+}
+
+/**
+   Terminate the hash to get the digest
+   @param md  The hash state
+   @param out [out] The destination of the hash (64 bytes)
+   @return CRYPT_OK if successful
+*/
+int sha512_done(struct sha512_state *md, unsigned char *out)
+{
+	int i;
+
+	if (md->curlen >= sizeof(md->buf))
+		return -1;
+
+	/* increase the length of the message */
+	md->length += md->curlen * CONST64(8);
+
+	/* append the '1' bit */
+	md->buf[md->curlen++] = (unsigned char)0x80;
+
+	/* if the length is currently above 112 bytes we append zeros
+	 * then compress.  Then we can fall back to padding zeros and length
+	 * encoding like normal.
+	 */
+	if (md->curlen > 112) {
+		while (md->curlen < 128) {
+			md->buf[md->curlen++] = (unsigned char)0;
+		}
+		sha512_compress(md, md->buf);
+		md->curlen = 0;
+	}
+
+	/* pad upto 120 bytes of zeroes
+	 * note: that from 112 to 120 is the 64 MSB of the length.  We assume that you won't hash
+	 * > 2^64 bits of data... :-)
+	 */
+	while (md->curlen < 120) {
+		md->buf[md->curlen++] = (unsigned char)0;
+	}
+
+	/* store length */
+	STORE64H(md->length, md->buf+120);
+	sha512_compress(md, md->buf);
+
+	/* copy output */
+	for (i = 0; i < 8; i++) {
+		STORE64H(md->state[i], out+(8*i));
+	}
+
+	return 0;
+}
+
+/* ===== end - public domain SHA512 implementation ===== */
diff --git a/src/crypto/sha512_i.h b/src/crypto/sha512_i.h
new file mode 100644
index 0000000..1089589
--- /dev/null
+++ b/src/crypto/sha512_i.h
@@ -0,0 +1,25 @@
+/*
+ * SHA-512 internal definitions
+ * Copyright (c) 2015, Pali Roh?r <pali.rohar at gmail.com>
+ *
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
+ */
+
+#ifndef SHA512_I_H
+#define SHA512_I_H
+
+#define SHA512_BLOCK_SIZE 128
+
+struct sha512_state {
+	u64 length, state[8];
+	u32 curlen;
+	u8 buf[SHA512_BLOCK_SIZE];
+};
+
+void sha512_init(struct sha512_state *md);
+int sha512_process(struct sha512_state *md, const unsigned char *in,
+		   unsigned long inlen);
+int sha512_done(struct sha512_state *md, unsigned char *out);
+
+#endif /* SHA512_I_H */
-- 
1.7.9.5



From ilan.peer at intel.com  Sun Nov 22 02:51:50 2015
From: ilan.peer at intel.com (Peer, Ilan)
Date: Sun, 22 Nov 2015 10:51:50 +0000
Subject: [PATCH 4/6] tests: Test no P2P GO move when invitation is in
 progress
In-Reply-To: <20151121163339.GB15961@w1.fi>
References: <1446560701-30841-1-git-send-email-ilan.peer@intel.com>
 <1446560701-30841-5-git-send-email-ilan.peer@intel.com>
 <20151121163339.GB15961@w1.fi>
Message-ID: <CB3B3D4774441E42AA3EA0E1BA8230A04DC6B26F@HASMSX110.ger.corp.intel.com>

Hi Jouni,

> -----Original Message-----
> From: Jouni Malinen [mailto:j at w1.fi]
> Sent: Saturday, November 21, 2015 18:34
> To: Peer, Ilan
> Cc: hostap at lists.infradead.org
> Subject: Re: [PATCH 4/6] tests: Test no P2P GO move when invitation is in
> progress
> 
> On Tue, Nov 03, 2015 at 04:24:59PM +0200, Ilan Peer wrote:
> > Add a test to verify that a P2P GO does not start a CSA once
> > invitation signalling is done, and the P2P client is about to connect.
> 
> Could you please clarify how this is supposed to work? The long wait for CSA
> seems to be completed before starting the invitation and there is no checks
> for CSA after the invitation is started.
> 

1. This is based on the timing of P2P GO move which is 30 seconds after the P2P GO has started. The test waits 29.9 seconds after the P2P GO has started and starts the invitation flow, assuming that the P2P GO CSA evaluation is going to happen in 100ms. As this is timing sensitive, I'll change this so it would depend on testing configuration over the control interface.

2. A P2P GO CSA after the invitation is no longer expected, as during the invitation signaling the P2P GO includes only its current operating channel in the channel list. Since the P2P spec requires that the channels in the channel list in the invitation response are a subset of the channels in the channel list in the invitation request, the invitation signaling ends up with only a single channel in the group common frequencies, so when a P2P CSA is considered again, there are no valid channels to move to. I'll clarify this in the test.

Thanks,

Ilan.



From ilan.peer at intel.com  Sun Nov 22 05:57:50 2015
From: ilan.peer at intel.com (Ilan Peer)
Date: Sun, 22 Nov 2015 15:57:50 +0200
Subject: [PATCH v2 1/3] P2P: Set p2p_go_wait_client in invitation_result() cb
Message-ID: <1448200672-2408-1-git-send-email-ilan.peer@intel.com>

When an invitation to join an existing group is accepted by the
peer device, set p2p_go_wait_client to the current time so
that wpas_p2p_in_progress() would return != 0, thus preventing
P2P CSA, scanning etc., that would interfere with the peer
device connection.

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
 wpa_supplicant/p2p_supplicant.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 4e27c87..fd2c5ce 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -3099,9 +3099,21 @@ static void wpas_invitation_result(void *ctx, int status, const u8 *bssid,
 	wpa_printf(MSG_DEBUG, "P2P: Invitation result - status=%d peer=" MACSTR,
 		   status, MAC2STR(peer));
 	if (wpa_s->pending_invite_ssid_id == -1) {
+		struct wpa_supplicant *group_if =
+			wpa_s->global->p2p_invite_group;
+
 		if (status == P2P_SC_FAIL_UNKNOWN_GROUP)
 			wpas_remove_persistent_client(wpa_s, peer);
-		return; /* Invitation to active group */
+
+		/*
+		 * Invitation to active group. Set the client wait, to allow
+		 * provisioning and connection.
+		 */
+		if (status == P2P_SC_SUCCESS &&
+		    group_if && group_if->current_ssid &&
+		    group_if->current_ssid->mode == WPAS_MODE_P2P_GO)
+			os_get_reltime(&wpa_s->global->p2p_go_wait_client);
+		return;
 	}
 
 	if (status == P2P_SC_FAIL_INFO_CURRENTLY_UNAVAILABLE) {
-- 
1.9.1



From ilan.peer at intel.com  Sun Nov 22 05:57:51 2015
From: ilan.peer at intel.com (Ilan Peer)
Date: Sun, 22 Nov 2015 15:57:51 +0200
Subject: [PATCH v2 2/3] P2P: Add a testing option to force P2P GO CSA
In-Reply-To: <1448200672-2408-1-git-send-email-ilan.peer@intel.com>
References: <1448200672-2408-1-git-send-email-ilan.peer@intel.com>
Message-ID: <1448200672-2408-2-git-send-email-ilan.peer@intel.com>

Add a testing option to force a P2P GO CSA on successful
invitation to join an active P2P GO.

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
 wpa_supplicant/ctrl_iface.c       |  2 ++
 wpa_supplicant/p2p_supplicant.c   | 14 +++++++++++++-
 wpa_supplicant/wpa_supplicant_i.h |  1 +
 3 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 6113db6..f10a85a 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -467,6 +467,8 @@ static int wpa_supplicant_ctrl_iface_set(struct wpa_supplicant *wpa_s,
 		wpa_s->extra_roc_dur = atoi(value);
 	} else if (os_strcasecmp(cmd, "test_failure") == 0) {
 		wpa_s->test_failure = atoi(value);
+	} else if (os_strcasecmp(cmd, "p2p_go_csa_on_inv") == 0) {
+		wpa_s->p2p_go_csa_on_inv = !!atoi(value);
 #endif /* CONFIG_TESTING_OPTIONS */
 #ifndef CONFIG_NO_CONFIG_BLOBS
 	} else if (os_strcmp(cmd, "blob") == 0) {
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index fd2c5ce..d2a4535 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -3111,8 +3111,20 @@ static void wpas_invitation_result(void *ctx, int status, const u8 *bssid,
 		 */
 		if (status == P2P_SC_SUCCESS &&
 		    group_if && group_if->current_ssid &&
-		    group_if->current_ssid->mode == WPAS_MODE_P2P_GO)
+		    group_if->current_ssid->mode == WPAS_MODE_P2P_GO) {
 			os_get_reltime(&wpa_s->global->p2p_go_wait_client);
+#ifdef CONFIG_TESTING_OPTIONS
+			if (group_if->p2p_go_csa_on_inv) {
+				wpa_printf(MSG_DEBUG,
+					   "Testing: force P2P GO CSA after invitation");
+				eloop_cancel_timeout(wpas_p2p_reconsider_moving_go,
+						     wpa_s, NULL);
+				eloop_register_timeout(0, 50000,
+						       wpas_p2p_reconsider_moving_go,
+						       wpa_s, NULL);
+			}
+#endif /* CONFIG_TESTING_OPTIONS */
+		}
 		return;
 	}
 
diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
index 6d2786b..f4edc92 100644
--- a/wpa_supplicant/wpa_supplicant_i.h
+++ b/wpa_supplicant/wpa_supplicant_i.h
@@ -982,6 +982,7 @@ struct wpa_supplicant {
 	struct l2_packet_data *l2_test;
 	unsigned int extra_roc_dur;
 	enum wpa_supplicant_test_failure test_failure;
+	unsigned int p2p_go_csa_on_inv;
 #endif /* CONFIG_TESTING_OPTIONS */
 
 	struct wmm_ac_assoc_data *wmm_ac_assoc_info;
-- 
1.9.1



From ilan.peer at intel.com  Sun Nov 22 05:57:52 2015
From: ilan.peer at intel.com (Ilan Peer)
Date: Sun, 22 Nov 2015 15:57:52 +0200
Subject: [PATCH v2 3/3] tests: Test no P2P GO move when invitation is in
 progress
In-Reply-To: <1448200672-2408-1-git-send-email-ilan.peer@intel.com>
References: <1448200672-2408-1-git-send-email-ilan.peer@intel.com>
Message-ID: <1448200672-2408-3-git-send-email-ilan.peer@intel.com>

Add a test to verify that a P2P GO does not start a CSA
once invitation signalling is done, and the P2P client is
about to connect.

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
 tests/hwsim/test_p2p_channel.py | 73 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)

diff --git a/tests/hwsim/test_p2p_channel.py b/tests/hwsim/test_p2p_channel.py
index 53e4ea5..13ffdfe 100644
--- a/tests/hwsim/test_p2p_channel.py
+++ b/tests/hwsim/test_p2p_channel.py
@@ -918,3 +918,76 @@ def test_p2p_go_move_scm_multi(dev, apdev, params):
     finally:
         dev[0].global_request("P2P_SET disallow_freq ")
         dev[0].global_request("SET p2p_go_freq_change_policy 2")
+
+def test_p2p_delay_go_csa(dev, apdev, params):
+    """P2P GO CSA delayed when inviting a P2P Device to an active P2P Group [long]"""
+    if not params['long']:
+        raise HwsimSkip("Skip test case with long duration due to --long not specified")
+
+    with HWSimRadio(n_channels=2) as (radio, iface):
+        wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
+        wpas.interface_add(iface)
+
+        wpas.global_request("SET p2p_no_group_iface 0")
+
+        if wpas.get_mcc() < 2:
+           raise Exception("New radio does not support MCC")
+
+        addr0 = wpas.p2p_dev_addr()
+        addr1 = dev[1].p2p_dev_addr()
+
+        try:
+            hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": 'bss-2.4ghz',
+                                                        "channel": '1' })
+
+            wpas.connect("bss-2.4ghz", key_mgmt="NONE", scan_freq="2412")
+
+            dev[1].p2p_listen();
+	    if not wpas.discover_peer(addr1, social=True):
+		raise Exception("Peer " + addr1 + " not found")
+
+            wpas.global_request("SET p2p_go_freq_change_policy 0")
+	    wpas.dump_monitor()
+
+            logger.info("Start GO on channel 6")
+            res = autogo(wpas, freq=2437)
+            if res['freq'] != "2437":
+               raise Exception("GO set on a freq=%s instead of 2437" % res['freq'])
+
+	    if not dev[1].discover_peer(addr0, social=False):
+		raise Exception("Peer " + addr1 + " not found")
+
+            pin = dev[1].wps_read_pin()
+	    dev[1].global_request("P2P_CONNECT " + addr0 + " " + pin + " join auth")
+            dev[1].p2p_listen();
+
+            # Skip the initial client connection timeout after a P2P GO is setup
+            time.sleep(15)
+
+	    # force P2P GO on successful invitation signaling
+	    wpas.group_request("SET p2p_go_csa_on_inv 1")
+
+            logger.info("Starting invitation")
+            wpas.p2p_go_authorize_client(pin)
+	    wpas.global_request("P2P_INVITE group=" + wpas.group_ifname + " peer=" + addr1)
+	    ev = dev[1].wait_global_event(["P2P-INVITATION-RECEIVED",
+		    "P2P-GROUP-STARTED"], timeout=10)
+
+	    if ev is None:
+	        raise Exception("Timeout on invitation on peer")
+	    if "P2P-INVITATION-RECEIVED" in ev:
+                raise Exception("Unexpected request to accept pre-authorized invitation")
+
+            # A P2P GO move is not expected at this stage, as during the
+	    # invitation signaling, the P2P GO includes only its current
+	    # operating channel in the channel list, and as the invitation
+	    # response can only include channels that were also in the
+	    # invitation request channel list, the group common channels
+	    # includes only the current P2P GO operating channel.
+	    ev = wpas.wait_group_event(["P2P-REMOVE-AND-REFORM-GROUP",
+		                       "AP-CSA-FINISHED"], 3)
+	    if ev is not None:
+	        raise Exception("Unexpected + " + ev + " event")
+
+        finally:
+            wpas.global_request("SET p2p_go_freq_change_policy 2")
-- 
1.9.1



From j at w1.fi  Sun Nov 22 10:17:31 2015
From: j at w1.fi (Jouni Malinen)
Date: Sun, 22 Nov 2015 20:17:31 +0200
Subject: [PATCH] Check for LIBRESSL_VERSION_NUMBER in tls_openssl.c
In-Reply-To: <1447636914-8904-1-git-send-email-kabel@blackhole.sk>
References: <1447636914-8904-1-git-send-email-kabel@blackhole.sk>
Message-ID: <20151122181731.GA24390@w1.fi>

On Mon, Nov 16, 2015 at 02:21:54AM +0100, Marek Beh?n wrote:
> LibreSSL does not yet support the new API, so do not use it
> when LIBRESSL_VERSION_NUMBER macro is defined.

Thanks applied (the version with Signed-off-by: added in a private
message to me).
 
-- 
Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Sun Nov 22 10:17:56 2015
From: j at w1.fi (Jouni Malinen)
Date: Sun, 22 Nov 2015 20:17:56 +0200
Subject: [PATCH 0/4] Add support for creating a new AP interface
In-Reply-To: <1446561012-2739-1-git-send-email-ilan.peer@intel.com>
References: <1446561012-2739-1-git-send-email-ilan.peer@intel.com>
Message-ID: <20151122181756.GB24390@w1.fi>

On Tue, Nov 03, 2015 at 04:30:08PM +0200, Ilan Peer wrote:
> Some devices support only a single station interface. Trying to
> create a new AP interface through the wpa_supplicant would fail
> on such devices, as the new interface is always created and
> setup as a station interface before changing it to an AP interface.
> 
> This patch set adds the support for creating a new AP interface
> without first setting up a station interface.

Thanks, all four patches applied.
 
-- 
Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Sun Nov 22 11:02:20 2015
From: j at w1.fi (Jouni Malinen)
Date: Sun, 22 Nov 2015 21:02:20 +0200
Subject: [PATCH 1/2] IAPP: Set SO_REUSEPORT on listening socket
In-Reply-To: <1447642602.3475.13.camel@gmail.com>
References: <1447179434-18596-1-git-send-email-bordjukov@gmail.com>
 <20151115171622.GB24360@w1.fi> <1447642602.3475.13.camel@gmail.com>
Message-ID: <20151122190220.GA31884@w1.fi>

On Mon, Nov 16, 2015 at 04:56:42AM +0200, Petko Bordjukov wrote:
> On ??, 2015-11-15 at 19:16 +0200, Jouni Malinen wrote:
> > SO_REUSEPORT is a pretty recent addition. Wouldn't this break build
> > with older header files? As such, this should probably be protected
> > with #ifdef SO_REUSEPORT or something similar.
> 
> Yes, SO_REUSEPORT is indeed a fairly new addition to Linux. I could
> protect it with an ifdef or I could just use SO_REUSEADDR. If I
> understand correctly there is little difference between the two with
> regards to multicast (with the exception of the UID checking for
> SO_REUSEPORT).
> 
> Having said that, I have not tested SO_REUSEADDR yet. I will and
> depending on the results will either submit a new version with
> SO_REUSEADDR or one with an ifdef around the setsockopt invocation.

I think I'm fine with either. Taken into account the current
implementation has been there for years, this cannot really be a
critical issue and using SO_REUSEPORT with ifdef should be fine.

> > It sounds like it would be safe to ignore the error and continue to
> > get the existing behavior.
> 
> Yes, it would be safe to continue. Should I make it just log a
> MSG_WARNING and carry on instead?

Yes.
 
-- 
Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Sun Nov 22 11:15:08 2015
From: j at w1.fi (Jouni Malinen)
Date: Sun, 22 Nov 2015 21:15:08 +0200
Subject: [PATCHv2] offchannel: Cancel the pending_action TX wait, before
 starting new one.
In-Reply-To: <1446477028-23118-1-git-send-email-chaitanya.mgit@gmail.com>
References: <1446477028-23118-1-git-send-email-chaitanya.mgit@gmail.com>
Message-ID: <20151122191508.GB31884@w1.fi>

On Mon, Nov 02, 2015 at 08:40:28PM +0530, Chaitanya T K wrote:
> From: tkc <chaitanya.mgit at gmail.com>
> 
> Before the tx_status is received for the action frame, if we
> get another request, we respond to that by freeing the memory
> for pending_action_tx, but we don't cancel the TX wait, so
> in the kernel the ROC will not be cancelled.
> 
> Due to above issue, wpa_supplicant assumes that all pending
> RoC's are cancelled and proceeds with interface creation and
> connection, where as state in mac80211/driver will be roc_in_progress.
> 
> This is leading to issues at driver level.
> 
> Signed-off-by: Chaitanya T K <chaitanya.mgit at gmail.com>
> ---
> V2: Fix 2 from's.
>     Remove the unnecessary braces.

I'm not sure I'd call that "From:" in the message body fixed (i.e., it
should have been the second one, not the first one; alternatively, it
would be fine to remove that From: line from the message body since the
one in the message header has a value matching that SOB).

> diff --git a/wpa_supplicant/offchannel.c b/wpa_supplicant/offchannel.c
> @@ -253,15 +253,9 @@ int offchannel_send_action(struct wpa_supplicant *wpa_s, unsigned int freq,
>  
>  	wpa_s->pending_action_tx_status_cb = tx_cb;
>  
> -	if (wpa_s->pending_action_tx) {
> -		wpa_printf(MSG_DEBUG, "Off-channel: Dropped pending Action "
> -			   "frame TX to " MACSTR " (pending_action_tx=%p)",
> -			   MAC2STR(wpa_s->pending_action_dst),
> -			   wpa_s->pending_action_tx);
> -		wpa_hexdump_buf(MSG_MSGDUMP, "Pending TX frame",
> -				wpa_s->pending_action_tx);
> -		wpabuf_free(wpa_s->pending_action_tx);
> -	}
> +	if (wpa_s->pending_action_tx)
> +		offchannel_send_action_done(wpa_s);

As noted in your reply to this, those debug prints should not be
removed.

As far as the change to offchannel_send_action_done() is concerned, I'm
not sure it is the correct thing to do in all cases. Why would we cancel
Action frame TX wait or remain-on-channel if the new frame is for the
same channel?

-- 
Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Sun Nov 22 11:19:37 2015
From: j at w1.fi (Jouni Malinen)
Date: Sun, 22 Nov 2015 21:19:37 +0200
Subject: [PATCH RESEND] hostapd: add VHT tx power envelope IE
In-Reply-To: <20151112110407.GA27719@rmanohar-arch.qca.qualcomm.com>
References: <1445604734-14654-1-git-send-email-rmanohar@qti.qualcomm.com>
 <20151028210005.GB12388@w1.fi>
 <20151112110407.GA27719@rmanohar-arch.qca.qualcomm.com>
Message-ID: <20151122191937.GC31884@w1.fi>

On Thu, Nov 12, 2015 at 04:34:11PM +0530, Rajkumar Manoharan wrote:
> On Wed, Oct 28, 2015 at 11:00:05PM +0200, Jouni Malinen wrote:
> > On Fri, Oct 23, 2015 at 06:22:14PM +0530, Rajkumar Manoharan wrote:
> > > Add VHT transmit power envelope element defined in IEEE std
> > > 802.11ac-2013 8.4.2.164 for VHT bandwidth channel switch.
> >
> > Please note that this has been renamed to "Transmit Power Envelope
> > element" in REVmc (i.e., "VHT" removed from the name).
> >
> Will remove VHT in next version. Should I keep the spec. section as it
> is?

You could refer to IEEE P802.11-REVmc/D4.3, 8.4.2.161 for Transmit Power
Envelope element, but anyway, it is fine to use IEEE Std 802.11ac-2013
in the commit message and just remove VHT from the actual code changes.

> > > +	/*
> > > +	 * Local Maximum Transmit power is encoded as 2's complement
> > > +	 * with a 0.5 dB step
> > > +	 */
> > > +	max_tx_power = ~(chan->max_tx_power * 2) + 1;
> > > +	*eid++ = max_tx_power;
> > > +	*eid++ = max_tx_power;
> > > +	*eid++ = max_tx_power;
> > 
> > Could you please clarify why all three values are set to the same value?
> > Would there be no case where the local maximum transmit power is
> > different for 20, 40, and 80 MHz channel cases?
> >
> Since I do not find per bandwidth max tx power, I used the channel max
> tx power for all bandwith. Is there a way to extract per-bw max tx power from
> regulatory. Please help.

No idea how that could be done, but the design here does not look
correct.

-- 
Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Sun Nov 22 11:24:01 2015
From: j at w1.fi (Jouni Malinen)
Date: Sun, 22 Nov 2015 21:24:01 +0200
Subject: Automatic channel selection
In-Reply-To: <20151110102529.GA30582@codethink.co.uk>
References: <20151110102529.GA30582@codethink.co.uk>
Message-ID: <20151122192401.GD31884@w1.fi>

On Tue, Nov 10, 2015 at 10:25:29AM +0000, Edward Cragg wrote:
> I've seen the implementation of automatic channel selection (ACS) in hostapd.
> 
> My problem is, that i need to implement ACS, in an application which uses
> wpa_supplicant, but not hostapd.

Which use case are you thinking of here? P2P or non-P2P AP mode?

> I'd really like to find out whether it would be appropriate at all to try to
> implement ACS within wpa_supplicant.
> 
> I would be undertaking to implement this ACS algorithm, and wondered whether
> this would be likely to be something upstream is interested in.

There are already mechanism for the driver to indicate the preferred
frequencies mostly for P2P use cases, but those are not supported by
most driver interfaces today. In general, it would make sense to extend
the ACS implementation used by hostapd to work with wpa_supplicant.
However, this should be done in a way that works for both non-P2P AP and
P2P use cases where the latter needs to be doable without actually
starting an AP interface (e.g., prior to starting GO Negotiation).

-- 
Jouni Malinen                                            PGP id EFC895FA


From eliba86 at gmail.com  Sun Nov 22 11:50:15 2015
From: eliba86 at gmail.com (Eli Balta)
Date: Sun, 22 Nov 2015 21:50:15 +0200
Subject: Updating deny acl mac list during runtime
Message-ID: <CAL5UD9b0QYD+0mshM6HgZ+rHMnCc+99canaMVZCqNSrzpnfreA@mail.gmail.com>

Hi all,

I am developing an application which is supposed to manage a wireless
access point on a Linux machine using hostapd 2.5.

I need to be able to dynamically add and remove hosts from the mac
filter list depending on various events.
What I'm doing right now is:
1) add/remove mac entry in /etc/hostapd.deny
2) send "SET deny_mac_file /etc/hostapd.deny" to the ctrl iface at
/var/run/hostapd/...

The problem:
This works only for adding entries to the list, if I remove an entry
and send the "SET deny_mac_file /etc/hostapd.deny" command, it
succeeds, but the STA is still denied authentication whenever it tries
to connect.

Is there any way to solve this problem without having to make
modifications to the code?

Thanks,
Eli


From j at w1.fi  Sun Nov 22 13:11:53 2015
From: j at w1.fi (Jouni Malinen)
Date: Sun, 22 Nov 2015 23:11:53 +0200
Subject: [PATCH] Support for launching Chrome browser(if present) from
 HS20 client
In-Reply-To: <CAG8jGXOQT3e6e0vXat0D92k0=ZcQmvVkuFx5mWfcOx7VTZZ8Pg@mail.gmail.com>
References: <CAG8jGXM67FYagtf8Rz2GKLbL1ik4oem7w6Azex-7BeCcrpkouw@mail.gmail.com>
 <1446546891.29010.15.camel@sipsolutions.net>
 <CAG8jGXPTnTpYb_cL6XfBXFEvTqo8dFw5iCGOb+8q+AbHi_15DA@mail.gmail.com>
 <CAG8jGXPM13O0qsF5_74TUeFAtnGc6XDHvJBsZFo3-3VpqTepuA@mail.gmail.com>
 <1446549279.29010.17.camel@sipsolutions.net>
 <CAG8jGXOQT3e6e0vXat0D92k0=ZcQmvVkuFx5mWfcOx7VTZZ8Pg@mail.gmail.com>
Message-ID: <20151122211153.GA4178@w1.fi>

On Tue, Nov 03, 2015 at 06:29:12PM +0530, Somdas Bandyopadhyay wrote:
> I agree that if the user  saves his/her option then the pop up will
> not be shown. PFA the patch that can be used to give the option to the
> user for selecting his/her browser. One thing is for sure that we
> should not be always launching the native android browser as it is not
> present in most of the devices.  I would anyways prefer that we
> directly launch the chrome browser (patch submitted earlier in the
> thread), instead of showing a pop up to the user for selecting the
> browser.

I applied this patch since this looks like the safest approach here to
allow this to work on all devices. Anyway, like I noted previously, I
don't really recommend use of browser-android.c since there is not
sufficient support for controlling the UI.

-- 
Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Sun Nov 22 13:13:10 2015
From: j at w1.fi (Jouni Malinen)
Date: Sun, 22 Nov 2015 23:13:10 +0200
Subject: [PATCH v2 3/3] tests: Test no P2P GO move when invitation is in
 progress
In-Reply-To: <1448200672-2408-3-git-send-email-ilan.peer@intel.com>
References: <1448200672-2408-1-git-send-email-ilan.peer@intel.com>
 <1448200672-2408-3-git-send-email-ilan.peer@intel.com>
Message-ID: <20151122211310.GB4178@w1.fi>

On Sun, Nov 22, 2015 at 03:57:52PM +0200, Ilan Peer wrote:
> Add a test to verify that a P2P GO does not start a CSA
> once invitation signalling is done, and the P2P client is
> about to connect.

Thanks, all three applied.

> diff --git a/tests/hwsim/test_p2p_channel.py b/tests/hwsim/test_p2p_channel.py
> @@ -918,3 +918,76 @@ def test_p2p_go_move_scm_multi(dev, apdev, params):
> +def test_p2p_delay_go_csa(dev, apdev, params):
> +    """P2P GO CSA delayed when inviting a P2P Device to an active P2P Group [long]"""

> +            # Skip the initial client connection timeout after a P2P GO is setup
> +            time.sleep(15)

This can be avoided by using another client to clear the initial wait. I
changed that and optimized other steps to make the test case pass much
more quickly so that the --long dependency can be removed.

-- 
Jouni Malinen                                            PGP id EFC895FA


From thefrankrizzo at hotmail.com  Sun Nov 22 19:38:34 2015
From: thefrankrizzo at hotmail.com (Frank Rizzo)
Date: Sun, 22 Nov 2015 19:38:34 -0800
Subject: Client reboots, can't reconnect for 5-8 minutes?
Message-ID: <BLU436-SMTP534EE2FD9DE25AB5C08EF0B2070@phx.gbl>

Hey guys,

This is something that I'm observing, and I'm hoping it's been seen  
before, and there's a simple solution.

I have hostap setup and running, with freeradius.  I connect to the server  
with an android tablet.

The 1st connection after a fresh reboot of the server, and the tablet  
connects IMMEDIATELY, and works fine.  If I reboot the tablet, it can't  
connect to the server for a period of time.  (Most recent tests were 5,  
and 8 minutes).  After this time has elapsed, it connects quickly, and  
works fine.  I assumed it was a long inactivity timeout being set, and  
hostap was assuming that the tablet was still connected, and refusing to  
allow it to connect again.  So, I added ap_max_inactivity=30.  Figuring it  
takes 45 seconds for the tablet to reboot, the records should be clean  
when it go around to trying to reconnect.

THIS DIDN'T SOLVE IT.

So, I must be missing something.  Any help?

config:



interface=wlan0
driver=nl80211

logger_stdout=2
logger_stdout_level=1
logger_syslog=2
logger_syslog_level=2

ctrl_interface=/var/run/hostapd
ctrl_interface_group=0

ieee8021x=1
eap_server=0
eapol_key_index_workaround=0
eap_reauth_period=0
eapol_version=1

ssid=My-Test
country_code=US
hw_mode=g
channel=1
beacon_int=100
auth_algs=1

dynamic_vlan=2
vlan_file=hostapd.vlan
vlan_tagged_interface=wlan0

wpa=2
wpa_key_mgmt=WPA-EAP
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP

# this inactivity poll is just used as a nicer way of verifying
# inactivity; i.e., client will not report broken connection because
# disassociation frame is not sent immediately without first polling
# the STA with a data frame.
# default: 300 (i.e., 5 minutes)
ap_max_inactivity=30

#  RADIUS stuff
own_ip_addr=192.168.0.1  # The interface IP
nas_identifier=my_test
auth_server_addr=127.0.0.1 # Where is the radius server
auth_server_port=1812      # The port the radius server runs on
auth_server_shared_secret=RadiusKeyGoesHere


From thefrankrizzo at hotmail.com  Sun Nov 22 19:49:21 2015
From: thefrankrizzo at hotmail.com (Frank Rizzo)
Date: Sun, 22 Nov 2015 19:49:21 -0800
Subject: Client reboots, can't reconnect for 5-8 minutes?
In-Reply-To: <BLU436-SMTP534EE2FD9DE25AB5C08EF0B2070@phx.gbl>
References: <BLU436-SMTP534EE2FD9DE25AB5C08EF0B2070@phx.gbl>
Message-ID: <BLU436-SMTP1479042FC5D09C64BDC3EA1B2070@phx.gbl>

One other bit of data about this issue.

If I kill, and restart hostapd, the tablet connects immediately.  So, it's  
like there's some internal timeout that has to expire before a reconnect  
can happen.

-Frank


On Sun, 22 Nov 2015 19:38:34 -0800, Frank Rizzo  
<thefrankrizzo at hotmail.com> wrote:

> Hey guys,
>
> This is something that I'm observing, and I'm hoping it's been seen  
> before, and there's a simple solution.
>
> I have hostap setup and running, with freeradius.  I connect to the  
> server with an android tablet.
>
> The 1st connection after a fresh reboot of the server, and the tablet  
> connects IMMEDIATELY, and works fine.  If I reboot the tablet, it can't  
> connect to the server for a period of time.  (Most recent tests were 5,  
> and 8 minutes).  After this time has elapsed, it connects quickly, and  
> works fine.  I assumed it was a long inactivity timeout being set, and  
> hostap was assuming that the tablet was still connected, and refusing to  
> allow it to connect again.  So, I added ap_max_inactivity=30.  Figuring  
> it takes 45 seconds for the tablet to reboot, the records should be  
> clean when it go around to trying to reconnect.
>
> THIS DIDN'T SOLVE IT.
>
> So, I must be missing something.  Any help?
>
> config:
>
>
>
> interface=wlan0
> driver=nl80211
>
> logger_stdout=2
> logger_stdout_level=1
> logger_syslog=2
> logger_syslog_level=2
>
> ctrl_interface=/var/run/hostapd
> ctrl_interface_group=0
>
> ieee8021x=1
> eap_server=0
> eapol_key_index_workaround=0
> eap_reauth_period=0
> eapol_version=1
>
> ssid=My-Test
> country_code=US
> hw_mode=g
> channel=1
> beacon_int=100
> auth_algs=1
>
> dynamic_vlan=2
> vlan_file=hostapd.vlan
> vlan_tagged_interface=wlan0
>
> wpa=2
> wpa_key_mgmt=WPA-EAP
> wpa_pairwise=TKIP CCMP
> rsn_pairwise=CCMP
>
> # this inactivity poll is just used as a nicer way of verifying
> # inactivity; i.e., client will not report broken connection because
> # disassociation frame is not sent immediately without first polling
> # the STA with a data frame.
> # default: 300 (i.e., 5 minutes)
> ap_max_inactivity=30
>
> #  RADIUS stuff
> own_ip_addr=192.168.0.1  # The interface IP
> nas_identifier=my_test
> auth_server_addr=127.0.0.1 # Where is the radius server
> auth_server_port=1812      # The port the radius server runs on
> auth_server_shared_secret=RadiusKeyGoesHere
>
> _______________________________________________
> Hostap mailing list
> Hostap at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/hostap


From chaitanya.mgit at gmail.com  Sun Nov 22 22:06:25 2015
From: chaitanya.mgit at gmail.com (Krishna Chaitanya)
Date: Mon, 23 Nov 2015 11:36:25 +0530
Subject: [PATCHv2] offchannel: Cancel the pending_action TX wait, before
 starting new one.
In-Reply-To: <20151122191508.GB31884@w1.fi>
References: <1446477028-23118-1-git-send-email-chaitanya.mgit@gmail.com>
 <20151122191508.GB31884@w1.fi>
Message-ID: <CABPxzYKo9YJctjF41d9qWW1fm5D-Y-q9m5GYhYxeB+wL45o3pA@mail.gmail.com>

On Mon, Nov 23, 2015 at 12:45 AM, Jouni Malinen <j at w1.fi> wrote:
>
> On Mon, Nov 02, 2015 at 08:40:28PM +0530, Chaitanya T K wrote:
> > From: tkc <chaitanya.mgit at gmail.com>
> >
> > Before the tx_status is received for the action frame, if we
> > get another request, we respond to that by freeing the memory
> > for pending_action_tx, but we don't cancel the TX wait, so
> > in the kernel the ROC will not be cancelled.
> >
> > Due to above issue, wpa_supplicant assumes that all pending
> > RoC's are cancelled and proceeds with interface creation and
> > connection, where as state in mac80211/driver will be roc_in_progress.
> >
> > This is leading to issues at driver level.
> >
> > Signed-off-by: Chaitanya T K <chaitanya.mgit at gmail.com>
> > ---
> > V2: Fix 2 from's.
> >     Remove the unnecessary braces.
>
> I'm not sure I'd call that "From:" in the message body fixed (i.e., it
> should have been the second one, not the first one; alternatively, it
> would be fine to remove that From: line from the message body since the
> one in the message header has a value matching that SOB).
>
Sure will remove From.

>
> > diff --git a/wpa_supplicant/offchannel.c b/wpa_supplicant/offchannel.c
> > @@ -253,15 +253,9 @@ int offchannel_send_action(struct wpa_supplicant *wpa_s, unsigned int freq,
> >
> >       wpa_s->pending_action_tx_status_cb = tx_cb;
> >
> > -     if (wpa_s->pending_action_tx) {
> > -             wpa_printf(MSG_DEBUG, "Off-channel: Dropped pending Action "
> > -                        "frame TX to " MACSTR " (pending_action_tx=%p)",
> > -                        MAC2STR(wpa_s->pending_action_dst),
> > -                        wpa_s->pending_action_tx);
> > -             wpa_hexdump_buf(MSG_MSGDUMP, "Pending TX frame",
> > -                             wpa_s->pending_action_tx);
> > -             wpabuf_free(wpa_s->pending_action_tx);
> > -     }
> > +     if (wpa_s->pending_action_tx)
> > +             offchannel_send_action_done(wpa_s);
>
> As noted in your reply to this, those debug prints should not be
> removed.
>
> As far as the change to offchannel_send_action_done() is concerned, I'm
> not sure it is the correct thing to do in all cases. Why would we cancel
> Action frame TX wait or remain-on-channel if the new frame is for the
> same channel?
>
I think wpa_supplicant can start the RoC, the FSM in mac80211
will check whether to start a new or continue the old depending on
the channel and time.


From ilan.peer at intel.com  Mon Nov 23 01:27:54 2015
From: ilan.peer at intel.com (Peer, Ilan)
Date: Mon, 23 Nov 2015 09:27:54 +0000
Subject: [PATCH 0/4] Add support for creating a new AP interface
In-Reply-To: <20151122181756.GB24390@w1.fi>
References: <1446561012-2739-1-git-send-email-ilan.peer@intel.com>
 <20151122181756.GB24390@w1.fi>
Message-ID: <1448270884.11663.15.camel@ipeer-box>

-----Original Message-----
From: Jouni Malinen <j at w1.fi<mailto:Jouni%20Malinen%20%3cj at w1.fi%3e>>
To: Ilan Peer <ilan.peer at intel.com<mailto:Ilan%20Peer%20%3cilan.peer at intel.com%3e>>
Cc: hostap at lists.infradead.org<mailto:hostap at lists.infradead.org>
Subject: Re: [PATCH 0/4] Add support for creating a new AP interface
Date: Sun, 22 Nov 2015 20:17:56 +0200



On Tue, Nov 03, 2015 at 04:30:08PM +0200, Ilan Peer wrote:
> Some devices support only a single station interface. Trying to
> create a new AP interface through the wpa_supplicant would fail
> on such devices, as the new interface is always created and
> setup as a station interface before changing it to an AP interface.
>
> This patch set adds the support for creating a new AP interface
> without first setting up a station interface.

Thanks, all four patches applied.



Great. Thanks.

Ilan.

From ilan.peer at intel.com  Mon Nov 23 01:43:39 2015
From: ilan.peer at intel.com (Peer, Ilan)
Date: Mon, 23 Nov 2015 09:43:39 +0000
Subject: [PATCH v2 3/3] tests: Test no P2P GO move when invitation is in
 progress
In-Reply-To: <20151122211310.GB4178@w1.fi>
References: <1448200672-2408-1-git-send-email-ilan.peer@intel.com>
 <1448200672-2408-3-git-send-email-ilan.peer@intel.com>
 <20151122211310.GB4178@w1.fi>
Message-ID: <1448271830.31883.1.camel@ipeer-box>

On ?', 2015-11-22 at 23:13 +0200, Jouni Malinen wrote:
> On Sun, Nov 22, 2015 at 03:57:52PM +0200, Ilan Peer wrote:
> > Add a test to verify that a P2P GO does not start a CSA
> > once invitation signalling is done, and the P2P client is
> > about to connect.
> 
> Thanks, all three applied.
> 
> > diff --git a/tests/hwsim/test_p2p_channel.py b/tests/hwsim/test_p2p_channel.py
> > @@ -918,3 +918,76 @@ def test_p2p_go_move_scm_multi(dev, apdev, params):
> > +def test_p2p_delay_go_csa(dev, apdev, params):
> > +    """P2P GO CSA delayed when inviting a P2P Device to an active P2P Group [long]"""
> 
> > +            # Skip the initial client connection timeout after a P2P GO is setup
> > +            time.sleep(15)
> 
> This can be avoided by using another client to clear the initial wait. I
> changed that and optimized other steps to make the test case pass much
> more quickly so that the --long dependency can be removed.
> 

Much better :)

Thanks. Ilan.

From rmanohar at qti.qualcomm.com  Mon Nov 23 05:10:26 2015
From: rmanohar at qti.qualcomm.com (Rajkumar Manoharan)
Date: Mon, 23 Nov 2015 18:40:26 +0530
Subject: [PATCH v2] hostapd: add Transmit Power Envelope IE
Message-ID: <1448284226-8036-1-git-send-email-rmanohar@qti.qualcomm.com>

Add Transmit Power Envelope element defined in
IEEE P802.11-REVmc/D4.3, 8.4.2.161.

Signed-off-by: Rajkumar Manoharan <rmanohar at qti.qualcomm.com>
---
v2:
 * "VHT" removed from the name
 * removed channel switch conditions
 * handled 80+80/160 MHz case
 * corrected max tx power calculation

 src/ap/beacon.c         |   2 +
 src/ap/ieee802_11.h     |   1 +
 src/ap/ieee802_11_vht.c | 103 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 106 insertions(+)

diff --git a/src/ap/beacon.c b/src/ap/beacon.c
index 5f65b7d..d4054cb 100644
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
@@ -481,6 +481,7 @@ static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd,
 	if (hapd->iconf->ieee80211ac && !hapd->conf->disable_11ac) {
 		pos = hostapd_eid_vht_capabilities(hapd, pos);
 		pos = hostapd_eid_vht_operation(hapd, pos);
+		pos = hostapd_eid_vht_txpwr_env(hapd, pos);
 		pos = hostapd_eid_wb_chsw_wrapper(hapd, pos);
 	}
 	if (hapd->conf->vendor_vht)
@@ -1096,6 +1097,7 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd,
 	if (hapd->iconf->ieee80211ac && !hapd->conf->disable_11ac) {
 		tailpos = hostapd_eid_vht_capabilities(hapd, tailpos);
 		tailpos = hostapd_eid_vht_operation(hapd, tailpos);
+		tailpos = hostapd_eid_vht_txpwr_env(hapd, tailpos);
 		tailpos = hostapd_eid_wb_chsw_wrapper(hapd, tailpos);
 	}
 	if (hapd->conf->vendor_vht)
diff --git a/src/ap/ieee802_11.h b/src/ap/ieee802_11.h
index a2dd132..4788e6b 100644
--- a/src/ap/ieee802_11.h
+++ b/src/ap/ieee802_11.h
@@ -54,6 +54,7 @@ u8 * hostapd_eid_vht_capabilities(struct hostapd_data *hapd, u8 *eid);
 u8 * hostapd_eid_vht_operation(struct hostapd_data *hapd, u8 *eid);
 u8 * hostapd_eid_vendor_vht(struct hostapd_data *hapd, u8 *eid);
 u8 * hostapd_eid_wb_chsw_wrapper(struct hostapd_data *hapd, u8 *eid);
+u8 * hostapd_eid_vht_txpwr_env(struct hostapd_data *hapd, u8 *eid);
 
 int hostapd_ht_operation_update(struct hostapd_iface *iface);
 void ieee802_11_send_sa_query_req(struct hostapd_data *hapd,
diff --git a/src/ap/ieee802_11_vht.c b/src/ap/ieee802_11_vht.c
index 8d2c428..59522a7 100644
--- a/src/ap/ieee802_11_vht.c
+++ b/src/ap/ieee802_11_vht.c
@@ -17,6 +17,7 @@
 #include "sta_info.h"
 #include "beacon.h"
 #include "ieee802_11.h"
+#include "dfs.h"
 
 
 u8 * hostapd_eid_vht_capabilities(struct hostapd_data *hapd, u8 *eid)
@@ -184,6 +185,108 @@ u8 * hostapd_eid_wb_chsw_wrapper(struct hostapd_data *hapd, u8 *eid)
 }
 
 
+u8 * hostapd_eid_vht_txpwr_env(struct hostapd_data *hapd, u8 *eid)
+{
+	struct hostapd_iface *iface = hapd->iface;
+	struct hostapd_config *iconf = iface->conf;
+	struct hostapd_hw_modes *mode = iface->current_mode;
+	struct hostapd_channel_data *chan;
+	int dfs, i;
+	u8 channel, max_tx_power, tx_pwr_count, local_pwr_constraint;
+
+	if (!mode)
+		return eid;
+
+	if (ieee80211_freq_to_chan(iface->freq, &channel) ==
+	    NUM_HOSTAPD_MODES)
+		return eid;
+
+	for (i = 0; i < mode->num_channels; i++) {
+		if (mode->channels[i].freq == iface->freq)
+			break;
+	}
+	if (i == mode->num_channels)
+		return eid;
+
+	switch (iface->conf->vht_oper_chwidth) {
+	case VHT_CHANWIDTH_USE_HT:
+		if (iconf->secondary_channel == 0) {
+			/* Max Transmit Power count = 0 (20MHz) */
+			tx_pwr_count = 0;
+		} else {
+			/* Max Transmit Power count = 1 (20, 40MHz) */
+			tx_pwr_count = 1;
+		}
+		break;
+	case VHT_CHANWIDTH_80MHZ:
+		/* Max Transmit Power count = 2 (20, 40 and 80MHz) */
+		tx_pwr_count = 2;
+		break;
+	case VHT_CHANWIDTH_80P80MHZ:
+	case VHT_CHANWIDTH_160MHZ:
+		/* Max Transmit Power count = 3 (20, 40, 80, 160/80+80MHz) */
+		tx_pwr_count = 3;
+		break;
+	default:
+		return eid;
+	}
+
+	/*
+	 * Below local_pwr_constraint logic is referred from
+	 * hostapd_eid_pwr_constraint.
+	 *
+	 * Check if DFS is required by regulatory.
+	 */
+	dfs = hostapd_is_dfs_required(hapd->iface);
+	if (dfs < 0)
+		dfs = 0;
+
+	/*
+	 * In order to meet regulations when TPC is not implemented using
+	 * a transmit power that is below the legal maximum (including any
+	 * mitigation factor) should help. In this case, indicate 3 dB below
+	 * maximum allowed transmit power.
+	 */
+	if (hapd->iconf->local_pwr_constraint == -1)
+		local_pwr_constraint = (dfs == 0) ? 0 : 3;
+	else
+		local_pwr_constraint = hapd->iconf->local_pwr_constraint;
+
+	/*
+	 * A STA that is not an AP shall use a transmit power less than or
+	 * equal to the local maximum transmit power level for the channel.
+	 * The local maximum transmit power can be calculated from the formula:
+	 * local max TX pwr = max TX pwr - local pwr constraint
+	 * Where max TX pwr is maximum transmit power level specified for
+	 * channel in Country element and local pwr constraint is specified
+	 * for channel in this Power Constraint element.
+	 */
+	chan = &mode->channels[i];
+	max_tx_power = chan->max_tx_power - local_pwr_constraint;
+
+	/*
+	 * Local Maximum Transmit power is encoded as 2's complement
+	 * with a 0.5 dB step
+	 */
+	max_tx_power = ~(max_tx_power * 2) + 1;
+
+	*eid++ = WLAN_EID_VHT_TRANSMIT_POWER_ENVELOPE;
+	*eid++ = 4;
+
+	/*
+	 * Max Transmit Power count and
+	 * Max Transmit Power units = 0 (EIRP)
+	 */
+	*eid++ = tx_pwr_count;
+
+	i = 0;
+	while (i++ <= tx_pwr_count)
+		*eid++ = max_tx_power;
+
+	return eid;
+}
+
+
 u16 copy_sta_vht_capab(struct hostapd_data *hapd, struct sta_info *sta,
 		       const u8 *vht_capab)
 {
-- 
2.6.2



From j at w1.fi  Mon Nov 23 13:14:45 2015
From: j at w1.fi (Jouni Malinen)
Date: Mon, 23 Nov 2015 23:14:45 +0200
Subject: Client reboots, can't reconnect for 5-8 minutes?
In-Reply-To: <BLU436-SMTP534EE2FD9DE25AB5C08EF0B2070@phx.gbl>
References: <BLU436-SMTP534EE2FD9DE25AB5C08EF0B2070@phx.gbl>
Message-ID: <20151123211445.GA8864@w1.fi>

On Sun, Nov 22, 2015 at 07:38:34PM -0800, Frank Rizzo wrote:
> I have hostap setup and running, with freeradius.  I connect to the
> server with an android tablet.

Which Android tablet is this and which version of Android?

> The 1st connection after a fresh reboot of the server, and the
> tablet connects IMMEDIATELY, and works fine.  If I reboot the
> tablet, it can't connect to the server for a period of time.  (Most
> recent tests were 5, and 8 minutes).  After this time has elapsed,
> it connects quickly, and works fine.  I assumed it was a long
> inactivity timeout being set, and hostap was assuming that the
> tablet was still connected, and refusing to allow it to connect
> again.  So, I added ap_max_inactivity=30.  Figuring it takes 45
> seconds for the tablet to reboot, the records should be clean when
> it go around to trying to reconnect.

hostapd does not have functionality to refuse another connection after
a new association.

Would you be able to provide debug logs from hostapd (e.g., -dt on the
command line) showing the initial connection and reconnection attempts
after the table reboot? It would also be interesting to see logcat
information from the tablet with Wi-Fi debugging enabled to show what
happens there after that reboot and how it recovers from this in 5-8
minutes).

-- 
Jouni Malinen                                            PGP id EFC895FA


From johannes at sipsolutions.net  Tue Nov 24 04:27:57 2015
From: johannes at sipsolutions.net (Johannes Berg)
Date: Tue, 24 Nov 2015 13:27:57 +0100
Subject: [PATCH] tests: print test name to kernel log buffer
Message-ID: <1448368077-18325-1-git-send-email-johannes@sipsolutions.net>

From: Johannes Berg <johannes.berg at intel.com>

Print the test name to the kernel log buffer so debugging
cross-test issues becomes easier.

Signed-off-by: Johannes Berg <johannes.berg at intel.com>
---
 tests/hwsim/run-tests.py | 1 +
 tests/hwsim/vm/inside.sh | 1 +
 2 files changed, 2 insertions(+)

diff --git a/tests/hwsim/run-tests.py b/tests/hwsim/run-tests.py
index 13e360b3a2b9..c55ed8323698 100755
--- a/tests/hwsim/run-tests.py
+++ b/tests/hwsim/run-tests.py
@@ -400,6 +400,7 @@ def main():
             t = tests_to_run.pop(0)
 
         name = t.__name__.replace('test_', '', 1)
+        open('/dev/kmsg', 'w').write('running hwsim test case %s\n' % name)
         if log_handler:
             log_handler.stream.close()
             logger.removeHandler(log_handler)
diff --git a/tests/hwsim/vm/inside.sh b/tests/hwsim/vm/inside.sh
index abaaf35c4284..a060bc5dc11e 100755
--- a/tests/hwsim/vm/inside.sh
+++ b/tests/hwsim/vm/inside.sh
@@ -31,6 +31,7 @@ mknod -m 660 /dev/ttyS0 c 4 64
 mknod -m 660 /dev/random c 1 8
 mknod -m 660 /dev/urandom c 1 9
 mknod -m 666 /dev/null c 1 3
+mknod -m 666 /dev/kmsg c 1 11
 test -f /sys/class/misc/rfkill/dev && \
 	mknod -m 660 /dev/rfkill c $(cat /sys/class/misc/rfkill/dev | tr ':' ' ')
 ln -s /proc/self/fd/0 /dev/stdin
-- 
2.6.2



From johannes at sipsolutions.net  Tue Nov 24 08:39:58 2015
From: johannes at sipsolutions.net (Johannes Berg)
Date: Tue, 24 Nov 2015 17:39:58 +0100
Subject: [PATCH] tests: honour HWSIM_TEST_LOG_DIR variable
Message-ID: <1448383198-4354-1-git-send-email-johannes@sipsolutions.net>

From: Johannes Berg <johannes.berg at intel.com>

If /tmp has a relatively small size limit, or multiple people run the
tests on the same machine, using the same output directory can easily
cause problems.

Make the test framework honour the new HWSIM_TEST_LOG_DIR environment
variable to make it easier to avoid those problems.

Signed-off-by: Johannes Berg <johannes.berg at intel.com>
---
 tests/hwsim/vm/parallel-vm.py | 15 ++++++++-------
 tests/hwsim/vm/parallel-vm.sh |  6 +++++-
 tests/hwsim/vm/vm-run.sh      |  6 +++++-
 3 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/tests/hwsim/vm/parallel-vm.py b/tests/hwsim/vm/parallel-vm.py
index 40ab5e397714..e40d44fbad86 100755
--- a/tests/hwsim/vm/parallel-vm.py
+++ b/tests/hwsim/vm/parallel-vm.py
@@ -352,6 +352,13 @@ def main():
                    help="run tests under valgrind")
     p.add_argument('params', nargs='*')
     args = p.parse_args()
+
+    dir = os.environ.get('HWSIM_TEST_LOG_DIR', '/tmp/hwsim-test-logs')
+    try:
+        os.makedirs(dir)
+    except:
+        pass
+
     num_servers = args.num_servers
     rerun_failures = not args.no_retry
     if args.debug:
@@ -363,7 +370,7 @@ def main():
         extra_args += [ '--long' ]
     if args.codecov:
         print "Code coverage - build separate binaries"
-        logdir = "/tmp/hwsim-test-logs/" + str(timestamp)
+        logdir = os.path.join(dir, str(timestamp))
         os.makedirs(logdir)
         subprocess.check_call([os.path.join(scriptsdir, 'build-codecov.sh'),
                                logdir])
@@ -390,12 +397,6 @@ def main():
     if len(tests) == 0:
         sys.exit("No test cases selected")
 
-    dir = '/tmp/hwsim-test-logs'
-    try:
-        os.mkdir(dir)
-    except:
-        pass
-
     if args.shuffle:
         from random import shuffle
         shuffle(tests)
diff --git a/tests/hwsim/vm/parallel-vm.sh b/tests/hwsim/vm/parallel-vm.sh
index b2fd0786fd7b..f9e22d95b6af 100755
--- a/tests/hwsim/vm/parallel-vm.sh
+++ b/tests/hwsim/vm/parallel-vm.sh
@@ -9,7 +9,11 @@ if [ -z "$NUM" ]; then
 fi
 shift
 
-LOGS=/tmp/hwsim-test-logs
+if [ -n "$HWSIM_TEST_LOG_DIR" ] ; then
+	LOGS="$HWSIM_TEST_LOG_DIR"
+else
+	LOGS=/tmp/hwsim-test-logs
+fi
 mkdir -p $LOGS
 DATE=$(date +%s)
 
diff --git a/tests/hwsim/vm/vm-run.sh b/tests/hwsim/vm/vm-run.sh
index 98af2a4156c2..ab4df4c100be 100755
--- a/tests/hwsim/vm/vm-run.sh
+++ b/tests/hwsim/vm/vm-run.sh
@@ -6,7 +6,11 @@ if [ -z "$TESTDIR" ] ; then
 	TESTDIR=$(pwd)/../
 fi
 
-LOGS=/tmp/hwsim-test-logs
+if [ -n "$HWSIM_TEST_LOG_DIR" ] ; then
+	LOGS="$HWSIM_TEST_LOG_DIR"
+else
+	LOGS=/tmp/hwsim-test-logs
+fi
 
 # increase the memory size if you want to run with valgrind, 512 MB works
 MEMORY=192
-- 
2.6.2



From thefrankrizzo at hotmail.com  Tue Nov 24 12:54:38 2015
From: thefrankrizzo at hotmail.com (Frank Rizzo)
Date: Tue, 24 Nov 2015 12:54:38 -0800
Subject: Client reboots, can't reconnect for 5-8 minutes?
In-Reply-To: <20151123211445.GA8864@w1.fi>
References: <BLU436-SMTP534EE2FD9DE25AB5C08EF0B2070@phx.gbl>
 <20151123211445.GA8864@w1.fi>
Message-ID: <BLU436-SMTP260A373C4322B6029B75A94B2060@phx.gbl>

UPDATE!

I was using the 3.13.0-68 version of the kernel on Ubuntu.  (Which is the  
version that exhibited this problem).  I just updated to 3.19.0-33  
version, and the problem went AWAY.  Not sure if this is because of an  
updated wireless driver, or what.  But figured I'd pass that along.  It  
might help someone in the future.


From j at w1.fi  Wed Nov 25 13:08:05 2015
From: j at w1.fi (Jouni Malinen)
Date: Wed, 25 Nov 2015 23:08:05 +0200
Subject: [PATCH] tests: print test name to kernel log buffer
In-Reply-To: <1448368077-18325-1-git-send-email-johannes@sipsolutions.net>
References: <1448368077-18325-1-git-send-email-johannes@sipsolutions.net>
Message-ID: <20151125210805.GA27134@w1.fi>

On Tue, Nov 24, 2015 at 01:27:57PM +0100, Johannes Berg wrote:
> Print the test name to the kernel log buffer so debugging
> cross-test issues becomes easier.

Thanks, applied.
 
-- 
Jouni Malinen                                            PGP id EFC895FA


From david.luyens at gmail.com  Thu Nov 26 04:42:40 2015
From: david.luyens at gmail.com (David Luyens)
Date: Thu, 26 Nov 2015 13:42:40 +0100
Subject: openwrt configuration
In-Reply-To: <20151120112155.GA21329@w1.fi>
References: <CAH_-dtz1BX9b_fzUHLeKJUH-eq+tKgp=BzVUcy1QE80cGFJYaw@mail.gmail.com>
 <CAH_-dtx8GRbm8ctbRCM8TcbbtPEW-147ft564WGUerxajDiDbw@mail.gmail.com>
 <20151120112155.GA21329@w1.fi>
Message-ID: <CAH_-dtyQ1GXQ_aW0fokzYe3N_ULoK4Wne3LVWYK_FUJ3Lp5CSQ@mail.gmail.com>

Thanks! I was able to compile the new version on my laptop (ubuntu)
For some reason the openwrt does not work yet... will search a bit further...

Just a question, are the archives searchable? I cannot see where that
functionality is.
I am asking because I would like an example of an eap-sim example with
an external radius server, especially the radio part.
When I connect my mobile on the wireless part, it keeps asking for
login-passwd, so I assume it is not eat-sim but some other eap
flavour...

On Fri, Nov 20, 2015 at 12:21 PM, Jouni Malinen <j at w1.fi> wrote:
> On Fri, Nov 20, 2015 at 11:31:44AM +0100, David Luyens wrote:
>> Hi, I am trying to setup a hostapd on openwrt router, but it seems
>> that some specific options are not recognised.
>
>> root at OpenWrt:/# /usr/sbin/hostapd -P /var/run/wifi-phy1.pid -B
>> /var/run/hostapd-phy1.conf
>> Configuration file: /var/run/hostapd-phy1.conf
>> Line 38: unknown configuration item 'interworking'
>> Line 39: unknown configuration item 'internet'
>> Line 40: unknown configuration item 'asra'
>> Line 41: unknown configuration item 'network_auth_type'
>> Line 42: unknown configuration item 'nai_realm'
>> Line 43: unknown configuration item 'anqp_3gpp_cell_net'
>
> Those parameters are available only if hostapd has been built with
> Interworking support enabled (CONFIG_INTERWORKING=y in hostapd/.config).
>
> --
> Jouni Malinen                                            PGP id EFC895FA


From ilan.peer at intel.com  Thu Nov 26 09:21:50 2015
From: ilan.peer at intel.com (Ilan Peer)
Date: Thu, 26 Nov 2015 19:21:50 +0200
Subject: [RFC] AP: Add support for full station state
Message-ID: <1448558510-26936-1-git-send-email-ilan.peer@intel.com>

From: Ayala Beker <ayala.beker at intel.com>

Add support for drivers that support full
AP client state, i.e., can handle adding stations
that are not associated yet. For such drivers,
add a station after processing the authentication
request, instead of adding it in the association
response callback.

Doing so is beneficial in cases that the driver
cannot handle the add station request, in which
case it is useless to perform the complete
connection establishment.

Signed-off-by: Ayala Beker <ayala.beker at intel.com>
---
 src/ap/ap_drv_ops.c               |  19 ++-
 src/ap/ap_drv_ops.h               |  14 +-
 src/ap/ieee802_11.c               | 276 +++++++++++++++++++++++++++-----------
 src/ap/sta_info.c                 |   9 +-
 src/ap/sta_info.h                 |   1 +
 src/drivers/driver.h              |  20 ++-
 src/drivers/driver_nl80211.c      |  62 ++++++++-
 src/drivers/driver_nl80211_capa.c |   3 +
 8 files changed, 303 insertions(+), 101 deletions(-)

diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
index b390450..3b92890 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -33,6 +33,10 @@ u32 hostapd_sta_flags_to_drv(u32 flags)
 		res |= WPA_STA_SHORT_PREAMBLE;
 	if (flags & WLAN_STA_MFP)
 		res |= WPA_STA_MFP;
+	if (flags & WLAN_STA_AUTH)
+		res |= WPA_STA_AUTHENTICATED;
+	if (flags & WLAN_STA_ASSOC)
+		res |= WPA_STA_ASSOCIATED;
 	return res;
 }
 
@@ -384,13 +388,13 @@ int hostapd_sta_assoc(struct hostapd_data *hapd, const u8 *addr,
 }
 
 
-int hostapd_sta_add(struct hostapd_data *hapd,
-		    const u8 *addr, u16 aid, u16 capability,
-		    const u8 *supp_rates, size_t supp_rates_len,
-		    u16 listen_interval,
-		    const struct ieee80211_ht_capabilities *ht_capab,
-		    const struct ieee80211_vht_capabilities *vht_capab,
-		    u32 flags, u8 qosinfo, u8 vht_opmode)
+int hostapd_sta_add_set(struct hostapd_data *hapd,
+			const u8 *addr, u16 aid, u16 capability,
+			const u8 *supp_rates, size_t supp_rates_len,
+			u16 listen_interval,
+			const struct ieee80211_ht_capabilities *ht_capab,
+			const struct ieee80211_vht_capabilities *vht_capab,
+			u32 flags, u8 qosinfo, u8 vht_opmode, int set)
 {
 	struct hostapd_sta_add_params params;
 
@@ -412,6 +416,7 @@ int hostapd_sta_add(struct hostapd_data *hapd,
 	params.vht_opmode = vht_opmode;
 	params.flags = hostapd_sta_flags_to_drv(flags);
 	params.qosinfo = qosinfo;
+	params.set = set;
 	return hapd->driver->sta_add(hapd->drv_priv, &params);
 }
 
diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h
index 5a1e28e..ab93f3d 100644
--- a/src/ap/ap_drv_ops.h
+++ b/src/ap/ap_drv_ops.h
@@ -35,13 +35,13 @@ int hostapd_vlan_if_add(struct hostapd_data *hapd, const char *ifname);
 int hostapd_vlan_if_remove(struct hostapd_data *hapd, const char *ifname);
 int hostapd_set_wds_sta(struct hostapd_data *hapd, char *ifname_wds,
 			const u8 *addr, int aid, int val);
-int hostapd_sta_add(struct hostapd_data *hapd,
-		    const u8 *addr, u16 aid, u16 capability,
-		    const u8 *supp_rates, size_t supp_rates_len,
-		    u16 listen_interval,
-		    const struct ieee80211_ht_capabilities *ht_capab,
-		    const struct ieee80211_vht_capabilities *vht_capab,
-		    u32 flags, u8 qosinfo, u8 vht_opmode);
+int hostapd_sta_add_set(struct hostapd_data *hapd,
+			const u8 *addr, u16 aid, u16 capability,
+			const u8 *supp_rates, size_t supp_rates_len,
+			u16 listen_interval,
+			const struct ieee80211_ht_capabilities *ht_capab,
+			const struct ieee80211_vht_capabilities *vht_capab,
+			u32 flags, u8 qosinfo, u8 vht_opmode, int set);
 int hostapd_set_privacy(struct hostapd_data *hapd, int enabled);
 int hostapd_set_generic_elem(struct hostapd_data *hapd, const u8 *elem,
 			     size_t elem_len);
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 01b514e..59a648b 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -250,19 +250,20 @@ static u16 auth_shared_key(struct hostapd_data *hapd, struct sta_info *sta,
 #endif /* CONFIG_NO_RC4 */
 
 
-static void send_auth_reply(struct hostapd_data *hapd,
-			    const u8 *dst, const u8 *bssid,
-			    u16 auth_alg, u16 auth_transaction, u16 resp,
-			    const u8 *ies, size_t ies_len)
+static int send_auth_reply(struct hostapd_data *hapd,
+			   const u8 *dst, const u8 *bssid,
+			   u16 auth_alg, u16 auth_transaction, u16 resp,
+			   const u8 *ies, size_t ies_len)
 {
 	struct ieee80211_mgmt *reply;
 	u8 *buf;
 	size_t rlen;
+	int reply_res;
 
 	rlen = IEEE80211_HDRLEN + sizeof(reply->u.auth) + ies_len;
 	buf = os_zalloc(rlen);
 	if (buf == NULL)
-		return;
+		return -1;
 
 	reply = (struct ieee80211_mgmt *) buf;
 	reply->frame_control = IEEE80211_FC(WLAN_FC_TYPE_MGMT,
@@ -282,10 +283,16 @@ static void send_auth_reply(struct hostapd_data *hapd,
 		   " auth_alg=%d auth_transaction=%d resp=%d (IE len=%lu)",
 		   MAC2STR(dst), auth_alg, auth_transaction,
 		   resp, (unsigned long) ies_len);
-	if (hostapd_drv_send_mlme(hapd, reply, rlen, 0) < 0)
-		wpa_printf(MSG_INFO, "send_auth_reply: send");
+	if (hostapd_drv_send_mlme(hapd, reply, rlen, 0) < 0) {
+		wpa_printf(MSG_INFO, "send_auth_reply: send failed");
+		reply_res = WLAN_STATUS_UNSPECIFIED_FAILURE;
+	} else {
+		reply_res = WLAN_STATUS_SUCCESS;
+	}
 
 	os_free(buf);
+
+	return reply_res;
 }
 
 
@@ -296,17 +303,22 @@ static void handle_auth_ft_finish(void *ctx, const u8 *dst, const u8 *bssid,
 {
 	struct hostapd_data *hapd = ctx;
 	struct sta_info *sta;
+	int reply_res;
 
-	send_auth_reply(hapd, dst, bssid, WLAN_AUTH_FT, auth_transaction,
-			status, ies, ies_len);
-
-	if (status != WLAN_STATUS_SUCCESS)
-		return;
+	reply_res = send_auth_reply(hapd, dst, bssid, WLAN_AUTH_FT,
+				    auth_transaction, status, ies, ies_len);
 
 	sta = ap_get_sta(hapd, dst);
 	if (sta == NULL)
 		return;
 
+	if (sta->added_unassoc && (reply_res != WLAN_STATUS_SUCCESS ||
+				   status != WLAN_STATUS_SUCCESS)) {
+		hostapd_drv_sta_remove(hapd, sta->addr);
+		sta->added_unassoc = 0;
+		return;
+	}
+
 	hostapd_logger(hapd, dst, HOSTAPD_MODULE_IEEE80211,
 		       HOSTAPD_LEVEL_DEBUG, "authentication OK (FT)");
 	sta->flags |= WLAN_STA_AUTH;
@@ -369,18 +381,19 @@ static int auth_sae_send_commit(struct hostapd_data *hapd,
 				const u8 *bssid, int update)
 {
 	struct wpabuf *data;
+	int reply_res;
 
 	data = auth_build_sae_commit(hapd, sta, update);
 	if (data == NULL)
 		return WLAN_STATUS_UNSPECIFIED_FAILURE;
 
-	send_auth_reply(hapd, sta->addr, bssid,
-			WLAN_AUTH_SAE, 1, WLAN_STATUS_SUCCESS,
-			wpabuf_head(data), wpabuf_len(data));
+	reply_res = send_auth_reply(hapd, sta->addr, bssid, WLAN_AUTH_SAE, 1,
+				    WLAN_STATUS_SUCCESS, wpabuf_head(data),
+				    wpabuf_len(data));
 
 	wpabuf_free(data);
 
-	return WLAN_STATUS_SUCCESS;
+	return reply_res;
 }
 
 
@@ -389,18 +402,19 @@ static int auth_sae_send_confirm(struct hostapd_data *hapd,
 				 const u8 *bssid)
 {
 	struct wpabuf *data;
+	int reply_res;
 
 	data = auth_build_sae_confirm(hapd, sta);
 	if (data == NULL)
 		return WLAN_STATUS_UNSPECIFIED_FAILURE;
 
-	send_auth_reply(hapd, sta->addr, bssid,
-			WLAN_AUTH_SAE, 2, WLAN_STATUS_SUCCESS,
-			wpabuf_head(data), wpabuf_len(data));
+	reply_res = send_auth_reply(hapd, sta->addr, bssid, WLAN_AUTH_SAE, 2,
+				    WLAN_STATUS_SUCCESS, wpabuf_head(data),
+				    wpabuf_len(data));
 
 	wpabuf_free(data);
 
-	return WLAN_STATUS_SUCCESS;
+	return reply_res;
 }
 
 
@@ -698,15 +712,20 @@ static void handle_auth_sae(struct hostapd_data *hapd, struct sta_info *sta,
 			    const struct ieee80211_mgmt *mgmt, size_t len,
 			    u16 auth_transaction, u16 status_code)
 {
-	u16 resp = WLAN_STATUS_SUCCESS;
+	int resp = WLAN_STATUS_SUCCESS;
 	struct wpabuf *data = NULL;
 
 	if (!sta->sae) {
-		if (auth_transaction != 1 || status_code != WLAN_STATUS_SUCCESS)
-			return;
+		if (auth_transaction != 1 ||
+		    status_code != WLAN_STATUS_SUCCESS) {
+			resp = -1;
+			goto remove_sta;
+		}
 		sta->sae = os_zalloc(sizeof(*sta->sae));
-		if (sta->sae == NULL)
-			return;
+		if (!sta->sae) {
+			resp = -1;
+			goto remove_sta;
+		}
 		sta->sae->state = SAE_NOTHING;
 		sta->sae->sync = 0;
 	}
@@ -746,7 +765,8 @@ static void handle_auth_sae(struct hostapd_data *hapd, struct sta_info *sta,
 			if (sta->sae->tmp->anti_clogging_token == NULL) {
 				wpa_printf(MSG_ERROR,
 					   "SAE: Failed to alloc for anti-clogging token");
-				return;
+				resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
+				goto remove_sta;
 			}
 
 			/*
@@ -756,10 +776,11 @@ static void handle_auth_sae(struct hostapd_data *hapd, struct sta_info *sta,
 			 * Authentication frame, and the commit-scalar and
 			 * COMMIT-ELEMENT previously sent.
 			 */
-			if (auth_sae_send_commit(hapd, sta, mgmt->bssid, 0)) {
+			resp = auth_sae_send_commit(hapd, sta, mgmt->bssid, 0);
+			if (resp != WLAN_STATUS_SUCCESS) {
 				wpa_printf(MSG_ERROR,
 					   "SAE: Failed to send commit message");
-				return;
+				goto remove_sta;
 			}
 			sta->sae->state = SAE_COMMITTED;
 			sta->sae->sync = 0;
@@ -768,7 +789,7 @@ static void handle_auth_sae(struct hostapd_data *hapd, struct sta_info *sta,
 		}
 
 		if (status_code != WLAN_STATUS_SUCCESS)
-			return;
+			goto remove_sta;
 
 		resp = sae_parse_commit(sta->sae, mgmt->u.auth.variable,
 					((const u8 *) mgmt) + len -
@@ -778,14 +799,15 @@ static void handle_auth_sae(struct hostapd_data *hapd, struct sta_info *sta,
 			wpa_printf(MSG_DEBUG,
 				   "SAE: Drop commit message from " MACSTR " due to reflection attack",
 				   MAC2STR(sta->addr));
-			return;
+			goto remove_sta;
 		}
 		if (token && check_sae_token(hapd, sta->addr, token, token_len)
 		    < 0) {
 			wpa_printf(MSG_DEBUG, "SAE: Drop commit message with "
 				   "incorrect token from " MACSTR,
 				   MAC2STR(sta->addr));
-			return;
+			resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
+			goto remove_sta;
 		}
 
 		if (resp != WLAN_STATUS_SUCCESS)
@@ -810,7 +832,7 @@ static void handle_auth_sae(struct hostapd_data *hapd, struct sta_info *sta,
 			       "SAE authentication (RX confirm, status=%u)",
 			       status_code);
 		if (status_code != WLAN_STATUS_SUCCESS)
-			return;
+			goto remove_sta;
 		if (sta->sae->state >= SAE_CONFIRMED ||
 		    !(hapd->conf->mesh & MESH_ENABLED)) {
 			if (sae_check_confirm(sta->sae, mgmt->u.auth.variable,
@@ -827,7 +849,7 @@ static void handle_auth_sae(struct hostapd_data *hapd, struct sta_info *sta,
 			       "unexpected SAE authentication transaction %u (status=%u)",
 			       auth_transaction, status_code);
 		if (status_code != WLAN_STATUS_SUCCESS)
-			return;
+			goto remove_sta;
 		resp = WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION;
 	}
 
@@ -838,6 +860,13 @@ reply:
 				data ? wpabuf_head(data) : (u8 *) "",
 				data ? wpabuf_len(data) : 0);
 	}
+
+remove_sta:
+	if (sta->added_unassoc && (resp != WLAN_STATUS_SUCCESS ||
+				   status_code != WLAN_STATUS_SUCCESS)) {
+		hostapd_drv_sta_remove(hapd, sta->addr);
+		sta->added_unassoc = 0;
+	}
 	wpabuf_free(data);
 }
 
@@ -882,7 +911,7 @@ static void handle_auth(struct hostapd_data *hapd,
 	u16 auth_alg, auth_transaction, status_code;
 	u16 resp = WLAN_STATUS_SUCCESS;
 	struct sta_info *sta = NULL;
-	int res;
+	int res, reply_res;
 	u16 fc;
 	const u8 *challenge = NULL;
 	u32 session_timeout, acct_interim_interval;
@@ -1132,6 +1161,45 @@ static void handle_auth(struct hostapd_data *hapd,
 	else
 		ap_sta_no_session_timeout(hapd, sta);
 
+	/*
+	 * If driver supports full AP client state, add a station to driver
+	 * before send AUTH reply, to make sure the driver has resources,
+	 * and not to go through the entire auth/assoc handshake,
+	 * and fail it at the end.
+	 * If this is not the first transaction, in a multi-step authentication
+	 * algorithm, the station already exists in the driver
+	 * (sta->added_unassoc = 1) so skip it.
+	 * In mesh mode station is already added to the driver once
+	 * NEW_PEER_CANDIDATE event is received.
+	 */
+	if (FULL_AP_CLIENT_STATE_SUPPORTED(hapd->iface->drv_flags) &&
+	    !(hapd->conf->mesh & MESH_ENABLED) &&
+	    !(sta->added_unassoc)) {
+		/*
+		 * If a station that is already associated to the AP, is trying
+		 * to authenticate again, remove the STA entry, in order to make
+		 * sure the STA PS state gets cleared and configuration gets
+		 * updated.
+		 * To handle this, station's added_unassoc flag is cleared once
+		 * the station has completed association.
+		 */
+		hostapd_drv_sta_remove(hapd, sta->addr);
+		sta->flags &= ~(WLAN_STA_ASSOC | WLAN_STA_AUTH |
+				WLAN_STA_AUTHORIZED);
+
+		if (hostapd_sta_add_set(hapd, sta->addr, 0, 0, 0, 0, 0,
+					NULL, NULL, sta->flags, 0, 0, 0)) {
+			hostapd_logger(hapd, sta->addr,
+				       HOSTAPD_MODULE_IEEE80211,
+				       HOSTAPD_LEVEL_NOTICE,
+				       "Could not add STA to kernel driver");
+			resp = WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA;
+			goto fail;
+		} else {
+			sta->added_unassoc = 1;
+		}
+	}
+
 	switch (auth_alg) {
 	case WLAN_AUTH_OPEN:
 		hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
@@ -1205,8 +1273,15 @@ static void handle_auth(struct hostapd_data *hapd,
 	os_free(radius_cui);
 	hostapd_free_psk_list(psk);
 
-	send_auth_reply(hapd, mgmt->sa, mgmt->bssid, auth_alg,
-			auth_transaction + 1, resp, resp_ies, resp_ies_len);
+	reply_res = send_auth_reply(hapd, mgmt->sa, mgmt->bssid, auth_alg,
+				    auth_transaction + 1, resp, resp_ies,
+				    resp_ies_len);
+
+	if (sta && sta->added_unassoc && (resp != WLAN_STATUS_SUCCESS ||
+					  reply_res != WLAN_STATUS_SUCCESS)) {
+		hostapd_drv_sta_remove(hapd, sta->addr);
+		sta->added_unassoc = 0;
+	}
 }
 
 
@@ -1646,9 +1721,9 @@ static void send_deauth(struct hostapd_data *hapd, const u8 *addr,
 }
 
 
-static void send_assoc_resp(struct hostapd_data *hapd, struct sta_info *sta,
-			    u16 status_code, int reassoc, const u8 *ies,
-			    size_t ies_len)
+static u16 send_assoc_resp(struct hostapd_data *hapd, struct sta_info *sta,
+			   u16 status_code, int reassoc, const u8 *ies,
+			   size_t ies_len)
 {
 	int send_len;
 	u8 buf[sizeof(struct ieee80211_mgmt) + 1024];
@@ -1768,9 +1843,13 @@ static void send_assoc_resp(struct hostapd_data *hapd, struct sta_info *sta,
 
 	send_len += p - reply->u.assoc_resp.variable;
 
-	if (hostapd_drv_send_mlme(hapd, reply, send_len, 0) < 0)
+	if (hostapd_drv_send_mlme(hapd, reply, send_len, 0) < 0) {
 		wpa_printf(MSG_INFO, "Failed to send assoc resp: %s",
 			   strerror(errno));
+		return WLAN_STATUS_UNSPECIFIED_FAILURE;
+	}
+
+	return WLAN_STATUS_SUCCESS;
 }
 
 
@@ -1779,7 +1858,7 @@ static void handle_assoc(struct hostapd_data *hapd,
 			 int reassoc)
 {
 	u16 capab_info, listen_interval, seq_ctrl, fc;
-	u16 resp = WLAN_STATUS_SUCCESS;
+	u16 resp = WLAN_STATUS_SUCCESS, reply_res;
 	const u8 *pos;
 	int left, i;
 	struct sta_info *sta;
@@ -1846,6 +1925,12 @@ static void handle_assoc(struct hostapd_data *hapd,
 		wpa_printf(MSG_DEBUG, "FT: Allow STA " MACSTR " to associate "
 			   "prior to authentication since it is using "
 			   "over-the-DS FT", MAC2STR(mgmt->sa));
+
+		/*
+		 * Mark station as authenticated, to avoid adding station
+		 * entry in the driver as associated and not authenticated
+		 */
+		sta->flags |= WLAN_STA_AUTH;
 	} else
 #endif /* CONFIG_IEEE80211R */
 	if (sta == NULL || (sta->flags & WLAN_STA_AUTH) == 0) {
@@ -1973,7 +2058,12 @@ static void handle_assoc(struct hostapd_data *hapd,
 	sta->timeout_next = STA_NULLFUNC;
 
  fail:
-	send_assoc_resp(hapd, sta, resp, reassoc, pos, left);
+	reply_res = send_assoc_resp(hapd, sta, resp, reassoc, pos, left);
+	if (sta->added_unassoc && (resp != WLAN_STATUS_SUCCESS ||
+				   reply_res != WLAN_STATUS_SUCCESS)) {
+		hostapd_drv_sta_remove(hapd, sta->addr);
+		sta->added_unassoc = 0;
+	}
 }
 
 
@@ -2015,6 +2105,7 @@ static void handle_disassoc(struct hostapd_data *hapd,
 		hostapd_drv_br_delete_ip_neigh(hapd, 4, (u8 *) &sta->ipaddr);
 	ap_sta_ip6addr_del(hapd, sta);
 	hostapd_drv_sta_remove(hapd, sta->addr);
+	sta->added_unassoc = 0;
 
 	if (sta->timeout_next == STA_NULLFUNC ||
 	    sta->timeout_next == STA_DISASSOC) {
@@ -2391,28 +2482,28 @@ static void handle_auth_cb(struct hostapd_data *hapd,
 	u16 auth_alg, auth_transaction, status_code;
 	struct sta_info *sta;
 
+	sta = ap_get_sta(hapd, mgmt->da);
+	if (!sta) {
+		wpa_printf(MSG_INFO, "handle_auth_cb: STA " MACSTR " not found",
+			   MAC2STR(mgmt->da));
+		return;
+	}
+
+	auth_alg = le_to_host16(mgmt->u.auth.auth_alg);
+	auth_transaction = le_to_host16(mgmt->u.auth.auth_transaction);
+	status_code = le_to_host16(mgmt->u.auth.status_code);
+
 	if (!ok) {
 		hostapd_logger(hapd, mgmt->da, HOSTAPD_MODULE_IEEE80211,
 			       HOSTAPD_LEVEL_NOTICE,
 			       "did not acknowledge authentication response");
-		return;
+		goto fail;
 	}
 
 	if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.auth)) {
 		wpa_printf(MSG_INFO, "handle_auth_cb - too short payload (len=%lu)",
 			   (unsigned long) len);
-		return;
-	}
-
-	auth_alg = le_to_host16(mgmt->u.auth.auth_alg);
-	auth_transaction = le_to_host16(mgmt->u.auth.auth_transaction);
-	status_code = le_to_host16(mgmt->u.auth.status_code);
-
-	sta = ap_get_sta(hapd, mgmt->da);
-	if (!sta) {
-		wpa_printf(MSG_INFO, "handle_auth_cb: STA " MACSTR " not found",
-			   MAC2STR(mgmt->da));
-		return;
+		goto fail;
 	}
 
 	if (status_code == WLAN_STATUS_SUCCESS &&
@@ -2421,6 +2512,15 @@ static void handle_auth_cb(struct hostapd_data *hapd,
 		hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
 			       HOSTAPD_LEVEL_INFO, "authenticated");
 		sta->flags |= WLAN_STA_AUTH;
+		if (sta->added_unassoc)
+			hostapd_set_sta_flags(hapd, sta);
+		return;
+	}
+
+fail:
+	if (status_code != WLAN_STATUS_SUCCESS && sta->added_unassoc) {
+		hostapd_drv_sta_remove(hapd, sta->addr);
+		sta->added_unassoc = 0;
 	}
 }
 
@@ -2459,13 +2559,6 @@ static void handle_assoc_cb(struct hostapd_data *hapd,
 	struct ieee80211_ht_capabilities ht_cap;
 	struct ieee80211_vht_capabilities vht_cap;
 
-	if (len < IEEE80211_HDRLEN + (reassoc ? sizeof(mgmt->u.reassoc_resp) :
-				      sizeof(mgmt->u.assoc_resp))) {
-		wpa_printf(MSG_INFO, "handle_assoc_cb(reassoc=%d) - too short payload (len=%lu)",
-			   reassoc, (unsigned long) len);
-		return;
-	}
-
 	sta = ap_get_sta(hapd, mgmt->da);
 	if (!sta) {
 		wpa_printf(MSG_INFO, "handle_assoc_cb: STA " MACSTR " not found",
@@ -2473,12 +2566,20 @@ static void handle_assoc_cb(struct hostapd_data *hapd,
 		return;
 	}
 
+	if (len < IEEE80211_HDRLEN + (reassoc ? sizeof(mgmt->u.reassoc_resp) :
+				      sizeof(mgmt->u.assoc_resp))) {
+		wpa_printf(MSG_INFO,
+			   "handle_assoc_cb(reassoc=%d) - too short payload (len=%lu)",
+			   reassoc, (unsigned long)len);
+		goto remove_sta;
+	}
+
 	if (!ok) {
 		hostapd_logger(hapd, mgmt->da, HOSTAPD_MODULE_IEEE80211,
 			       HOSTAPD_LEVEL_DEBUG,
 			       "did not acknowledge association response");
 		sta->flags &= ~WLAN_STA_ASSOC_REQ_OK;
-		return;
+		goto remove_sta;
 	}
 
 	if (reassoc)
@@ -2522,10 +2623,14 @@ static void handle_assoc_cb(struct hostapd_data *hapd,
 
 	/*
 	 * Remove the STA entry in order to make sure the STA PS state gets
-	 * cleared and configuration gets updated in case of reassociation back
-	 * to the same AP.
+	 * cleared and configuration gets updated.
+	 * This is relevant for cases, such as FT over the DS, where a station
+	 * re-associates back to the same AP but skips the authentication flow.
+	 * Or, if working with a driver that doesn't support full AP client
+	 * state.
 	 */
-	hostapd_drv_sta_remove(hapd, sta->addr);
+	if (!sta->added_unassoc)
+		hostapd_drv_sta_remove(hapd, sta->addr);
 
 #ifdef CONFIG_IEEE80211N
 	if (sta->flags & WLAN_STA_HT)
@@ -2536,22 +2641,33 @@ static void handle_assoc_cb(struct hostapd_data *hapd,
 		hostapd_get_vht_capab(hapd, sta->vht_capabilities, &vht_cap);
 #endif /* CONFIG_IEEE80211AC */
 
-	if (hostapd_sta_add(hapd, sta->addr, sta->aid, sta->capability,
-			    sta->supported_rates, sta->supported_rates_len,
-			    sta->listen_interval,
-			    sta->flags & WLAN_STA_HT ? &ht_cap : NULL,
-			    sta->flags & WLAN_STA_VHT ? &vht_cap : NULL,
-			    sta->flags, sta->qosinfo, sta->vht_opmode)) {
-		hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
-			       HOSTAPD_LEVEL_NOTICE,
-			       "Could not add STA to kernel driver");
-
+	if (hostapd_sta_add_set(hapd, sta->addr, sta->aid, sta->capability,
+				sta->supported_rates, sta->supported_rates_len,
+				sta->listen_interval,
+				sta->flags & WLAN_STA_HT ? &ht_cap : NULL,
+				sta->flags & WLAN_STA_VHT ? &vht_cap : NULL,
+				sta->flags, sta->qosinfo, sta->vht_opmode,
+				sta->added_unassoc)) {
+		hostapd_logger(hapd, sta->addr,
+			       HOSTAPD_MODULE_IEEE80211, HOSTAPD_LEVEL_NOTICE,
+			       "Could not %s STA to kernel driver",
+			       sta->added_unassoc ? "set" : "add");
 		ap_sta_disconnect(hapd, sta, sta->addr,
 				  WLAN_REASON_DISASSOC_AP_BUSY);
-
+		if (sta->added_unassoc)
+			goto remove_sta;
 		return;
 	}
 
+	/*
+	 * added_unassoc flag is set for a station that was added to the driver
+	 * in unassociated state.
+	 * Clear this flag once the station has completed association, to make
+	 * sure STA entry will be cleared from the driver in case of
+	 * reassocition back to the same AP.
+	 */
+	sta->added_unassoc = 0;
+
 	if (sta->flags & WLAN_STA_WDS) {
 		int ret;
 		char ifname_wds[IFNAMSIZ + 1];
@@ -2585,6 +2701,12 @@ static void handle_assoc_cb(struct hostapd_data *hapd,
 	hapd->new_assoc_sta_cb(hapd, sta, !new_assoc);
 
 	ieee802_1x_notify_port_enabled(sta->eapol_sm, 1);
+
+remove_sta:
+	if (sta->added_unassoc) {
+		hostapd_drv_sta_remove(hapd, sta->addr);
+		sta->added_unassoc = 0;
+	}
 }
 
 
diff --git a/src/ap/sta_info.c b/src/ap/sta_info.c
index 500beff..802bbc8 100644
--- a/src/ap/sta_info.c
+++ b/src/ap/sta_info.c
@@ -169,8 +169,10 @@ void ap_free_sta(struct hostapd_data *hapd, struct sta_info *sta)
 	ap_sta_ip6addr_del(hapd, sta);
 
 	if (!hapd->iface->driver_ap_teardown &&
-	    !(sta->flags & WLAN_STA_PREAUTH))
+	    !(sta->flags & WLAN_STA_PREAUTH)) {
 		hostapd_drv_sta_remove(hapd, sta->addr);
+		sta->added_unassoc = 0;
+	}
 
 	ap_sta_hash_del(hapd, sta);
 	ap_sta_list_del(hapd, sta);
@@ -273,8 +275,10 @@ void ap_free_sta(struct hostapd_data *hapd, struct sta_info *sta)
 		 * VLAN.
 		 */
 		if (hapd->iface->driver_ap_teardown &&
-		    !(sta->flags & WLAN_STA_PREAUTH))
+		    !(sta->flags & WLAN_STA_PREAUTH)) {
 			hostapd_drv_sta_remove(hapd, sta->addr);
+			sta->added_unassoc = 0;
+		}
 		vlan_remove_dynamic(hapd, sta->vlan_id_bound);
 	}
 #endif /* CONFIG_NO_VLAN */
@@ -665,6 +669,7 @@ static int ap_sta_remove(struct hostapd_data *hapd, struct sta_info *sta)
 			   " from kernel driver.", MAC2STR(sta->addr));
 		return -1;
 	}
+	sta->added_unassoc = 0;
 	return 0;
 }
 
diff --git a/src/ap/sta_info.h b/src/ap/sta_info.h
index 09deac6..5b72252 100644
--- a/src/ap/sta_info.h
+++ b/src/ap/sta_info.h
@@ -87,6 +87,7 @@ struct sta_info {
 	unsigned int session_timeout_set:1;
 	unsigned int radius_das_match:1;
 	unsigned int ecsa_supported:1;
+	unsigned int added_unassoc:1;
 
 	u16 auth_alg;
 
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index e925a59..b1ad8d3 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -1225,8 +1225,13 @@ struct wpa_driver_capa {
 #define WPA_DRIVER_FLAGS_SUPPORT_HW_MODE_ANY	0x0000004000000000ULL
 /** Driver supports simultaneous off-channel operations */
 #define WPA_DRIVER_FLAGS_OFFCHANNEL_SIMULTANEOUS	0x0000008000000000ULL
+/** Driver supports full AP client state */
+#define WPA_DRIVER_FLAGS_SUPPORT_FULL_AP_CLIENT_STATE	0x0000010000000000ULL
 	u64 flags;
 
+#define FULL_AP_CLIENT_STATE_SUPPORTED(drv_flags) \
+	(drv_flags & WPA_DRIVER_FLAGS_SUPPORT_FULL_AP_CLIENT_STATE)
+
 #define WPA_DRIVER_SMPS_MODE_STATIC			0x00000001
 #define WPA_DRIVER_SMPS_MODE_DYNAMIC			0x00000002
 	unsigned int smps_modes;
@@ -1464,6 +1469,7 @@ struct wpa_bss_params {
 #define WPA_STA_MFP BIT(3)
 #define WPA_STA_TDLS_PEER BIT(4)
 #define WPA_STA_AUTHENTICATED BIT(5)
+#define WPA_STA_ASSOCIATED BIT(6)
 
 enum tdls_oper {
 	TDLS_DISCOVERY_REQ,
@@ -2325,12 +2331,16 @@ struct wpa_driver_ops {
 	 * @params: Station parameters
 	 * Returns: 0 on success, -1 on failure
 	 *
-	 * This function is used to add a station entry to the driver once the
-	 * station has completed association. This is only used if the driver
-	 * does not take care of association processing.
+	 * This function is used to add or set (params->set 1) a station
+	 * entry in the driver.
+	 *
+	 * With drivers that don't support full AP client state,
+	 * this function is used to add a station entry to the driver once the
+	 * station has completed association.
 	 *
-	 * With TDLS, this function is also used to add or set (params->set 1)
-	 * TDLS peer entries.
+	 * With TDLS, this function is used to add or set (params->set 1)
+	 * TDLS peer entries (even with drivers that not support
+	 * full AP client state).
 	 */
 	int (*sta_add)(void *priv, struct hostapd_sta_add_params *params);
 
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 43dd0b1..7309bf2 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -3687,6 +3687,8 @@ static u32 sta_flags_nl80211(int flags)
 		f |= BIT(NL80211_STA_FLAG_TDLS_PEER);
 	if (flags & WPA_STA_AUTHENTICATED)
 		f |= BIT(NL80211_STA_FLAG_AUTHENTICATED);
+	if (flags & WPA_STA_ASSOCIATED)
+		f |= BIT(NL80211_STA_FLAG_ASSOCIATED);
 
 	return f;
 }
@@ -3739,11 +3741,23 @@ static int wpa_driver_nl80211_sta_add(void *priv,
 	if (!msg || nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, params->addr))
 		goto fail;
 
-	if (!params->set || (params->flags & WPA_STA_TDLS_PEER)) {
+	/*
+	 * Set the below properties only in one of the following cases:
+	 * 1. New station is added, already associated.
+	 * 2. Set WPA_STA_TDLS_PEER station.
+	 * 3. Set an already added unassociated station, if driver supports
+	 * full AP client state. (Set these properties after station became
+	 * associated will be rejected by the driver).
+	 */
+	if (!params->set || (params->flags & WPA_STA_TDLS_PEER) ||
+	    (params->set &&
+	     FULL_AP_CLIENT_STATE_SUPPORTED(drv->capa.flags) &&
+	     params->flags & WPA_STA_ASSOCIATED)) {
 		wpa_hexdump(MSG_DEBUG, "  * supported rates",
 			    params->supp_rates, params->supp_rates_len);
 		wpa_printf(MSG_DEBUG, "  * capability=0x%x",
 			   params->capability);
+
 		if (nla_put(msg, NL80211_ATTR_STA_SUPPORTED_RATES,
 			    params->supp_rates_len, params->supp_rates) ||
 		    nla_put_u16(msg, NL80211_ATTR_STA_CAPABILITY,
@@ -3787,9 +3801,11 @@ static int wpa_driver_nl80211_sta_add(void *priv,
 			/*
 			 * cfg80211 validates that AID is non-zero, so we have
 			 * to make this a non-zero value for the TDLS case where
-			 * a dummy STA entry is used for now.
+			 * a dummy STA entry is used for now,
+			 * or for a station that is still not associated.
 			 */
-			wpa_printf(MSG_DEBUG, "  * aid=1 (TDLS workaround)");
+			wpa_printf(MSG_DEBUG,
+				   "  * aid=1 (TDLS/UNASSOC_STA workaround)");
 			if (nla_put_u16(msg, NL80211_ATTR_STA_AID, 1))
 				goto fail;
 		}
@@ -3802,6 +3818,17 @@ static int wpa_driver_nl80211_sta_add(void *priv,
 		wpa_printf(MSG_DEBUG, "  * peer_aid=%u", params->aid);
 		if (nla_put_u16(msg, NL80211_ATTR_PEER_AID, params->aid))
 			goto fail;
+	} else if (FULL_AP_CLIENT_STATE_SUPPORTED(drv->capa.flags) &&
+		   (params->flags & WPA_STA_ASSOCIATED)) {
+		wpa_printf(MSG_DEBUG, "  * aid=%u", params->aid);
+		if (nla_put_u16(msg, NL80211_ATTR_STA_AID,
+				params->aid))
+			goto fail;
+		wpa_printf(MSG_DEBUG, "  * listen_interval=%u",
+			   params->listen_interval);
+		if (nla_put_u16(msg, NL80211_ATTR_STA_LISTEN_INTERVAL,
+				params->listen_interval))
+			goto fail;
 	}
 
 	if (params->vht_opmode_enabled) {
@@ -3832,6 +3859,35 @@ static int wpa_driver_nl80211_sta_add(void *priv,
 	os_memset(&upd, 0, sizeof(upd));
 	upd.set = sta_flags_nl80211(params->flags);
 	upd.mask = upd.set | sta_flags_nl80211(params->flags_mask);
+
+	/*
+	 * If driver doesn't support full AP client state, ignore ASSOC/AUTH
+	 * flags, as nl80211 driver moves a new station, by default, into
+	 * associated state.
+	 * On the other hand, if driver supports that feature, and station is
+	 * added in un-authenticated state, set authenticated/associated bits
+	 * in the mask, to prevent moving this station to assoc state before
+	 * it's actually associated.
+	 *
+	 * This is irrlevant for MESH mode where station is added to the
+	 * driver as authenticated already, and ASSOCIATED isn't part of
+	 * the nl80211 API.
+	 */
+	if (!is_mesh_interface(drv->nlmode)) {
+		if (!FULL_AP_CLIENT_STATE_SUPPORTED(drv->capa.flags)) {
+			wpa_printf(MSG_WARNING,
+				   "Ignore ASSOC/AUTH flags since driver doesn't support full AP client state");
+			upd.mask &= ~(BIT(NL80211_STA_FLAG_ASSOCIATED) |
+				      BIT(NL80211_STA_FLAG_AUTHENTICATED));
+		} else if (!params->set &&
+			   !(params->flags & WPA_STA_TDLS_PEER)) {
+			if (!(params->flags & WPA_STA_AUTHENTICATED))
+				upd.mask |= BIT(NL80211_STA_FLAG_AUTHENTICATED);
+			if (!(params->flags & WPA_STA_ASSOCIATED))
+				upd.mask |= BIT(NL80211_STA_FLAG_ASSOCIATED);
+		}
+	}
+
 	wpa_printf(MSG_DEBUG, "  * flags set=0x%x mask=0x%x",
 		   upd.set, upd.mask);
 	if (nla_put(msg, NL80211_ATTR_STA_FLAGS2, sizeof(upd), &upd))
diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c
index 1b5752f..0140de3 100644
--- a/src/drivers/driver_nl80211_capa.c
+++ b/src/drivers/driver_nl80211_capa.c
@@ -428,6 +428,9 @@ static void wiphy_info_feature_flags(struct wiphy_info_data *info,
 
 	if (flags & NL80211_FEATURE_HT_IBSS)
 		capa->flags |= WPA_DRIVER_FLAGS_HT_IBSS;
+
+	if (flags & NL80211_FEATURE_FULL_AP_CLIENT_STATE)
+		capa->flags |= WPA_DRIVER_FLAGS_SUPPORT_FULL_AP_CLIENT_STATE;
 }
 
 
-- 
1.9.1



From ilan.peer at intel.com  Thu Nov 26 07:27:08 2015
From: ilan.peer at intel.com (Peer, Ilan)
Date: Thu, 26 Nov 2015 15:27:08 +0000
Subject: [RFC] AP: Add support for full station state
In-Reply-To: <1448558510-26936-1-git-send-email-ilan.peer@intel.com>
References: <1448558510-26936-1-git-send-email-ilan.peer@intel.com>
Message-ID: <CB3B3D4774441E42AA3EA0E1BA8230A04DC756C3@HASMSX110.ger.corp.intel.com>

> -----Original Message-----
> From: Hostap [mailto:hostap-bounces at lists.infradead.org] On Behalf Of Ilan
> Peer
> Sent: Thursday, November 26, 2015 19:22
> To: hostap at lists.infradead.org
> Cc: Beker, Ayala
> Subject: [RFC] AP: Add support for full station state
> 
> From: Ayala Beker <ayala.beker at intel.com>
> 
> Add support for drivers that support full AP client state, i.e., can handle
> adding stations that are not associated yet. For such drivers, add a station after
> processing the authentication request, instead of adding it in the association
> response callback.
> 
> Doing so is beneficial in cases that the driver cannot handle the add station
> request, in which case it is useless to perform the complete connection
> establishment.
> 

Please note that the patch still requires couple of fixes in cfg80211.

Regards,

Ilan.


From johannes at sipsolutions.net  Thu Nov 26 07:36:38 2015
From: johannes at sipsolutions.net (Johannes Berg)
Date: Thu, 26 Nov 2015 16:36:38 +0100
Subject: [RFC] AP: Add support for full station state
In-Reply-To: <CB3B3D4774441E42AA3EA0E1BA8230A04DC756C3@HASMSX110.ger.corp.intel.com>
References: <1448558510-26936-1-git-send-email-ilan.peer@intel.com>
 <CB3B3D4774441E42AA3EA0E1BA8230A04DC756C3@HASMSX110.ger.corp.intel.com>
Message-ID: <1448552198.2167.12.camel@sipsolutions.net>

On Thu, 2015-11-26 at 15:27 +0000, Peer, Ilan wrote:
> >?
> Please note that the patch still requires couple of fixes in
> cfg80211.
> 

And enablement, which I just posted :)

johannes


From j at w1.fi  Thu Nov 26 11:03:22 2015
From: j at w1.fi (Jouni Malinen)
Date: Thu, 26 Nov 2015 21:03:22 +0200
Subject: [PATCH v2] hostapd: add Transmit Power Envelope IE
In-Reply-To: <1448284226-8036-1-git-send-email-rmanohar@qti.qualcomm.com>
References: <1448284226-8036-1-git-send-email-rmanohar@qti.qualcomm.com>
Message-ID: <20151126190321.GA29401@w1.fi>

On Mon, Nov 23, 2015 at 06:40:26PM +0530, Rajkumar Manoharan wrote:
> Add Transmit Power Envelope element defined in
> IEEE P802.11-REVmc/D4.3, 8.4.2.161.

Thanks, applied.

> diff --git a/src/ap/ieee802_11_vht.c b/src/ap/ieee802_11_vht.c
> +u8 * hostapd_eid_vht_txpwr_env(struct hostapd_data *hapd, u8 *eid)

> +	max_tx_power = chan->max_tx_power - local_pwr_constraint;
> +
> +	/*
> +	 * Local Maximum Transmit power is encoded as 2's complement
> +	 * with a 0.5 dB step
> +	 */
> +	max_tx_power = ~(max_tx_power * 2) + 1;

Though, this does not look correct.. That would mess up positive values
pretty badly. I think I fixed this, but anyway, please take a look at
send a patch to update this, if needed.

> +	*eid++ = WLAN_EID_VHT_TRANSMIT_POWER_ENVELOPE;
> +	*eid++ = 4;

That length value is not correct since this is now variable length:

> +	/*
> +	 * Max Transmit Power count and
> +	 * Max Transmit Power units = 0 (EIRP)
> +	 */
> +	*eid++ = tx_pwr_count;
> +
> +	i = 0;
> +	while (i++ <= tx_pwr_count)
> +		*eid++ = max_tx_power;

Here.. Fixed the length field to match.
 
-- 
Jouni Malinen                                            PGP id EFC895FA


From rmanohar at qti.qualcomm.com  Fri Nov 27 01:38:20 2015
From: rmanohar at qti.qualcomm.com (Rajkumar Manoharan)
Date: Fri, 27 Nov 2015 15:08:20 +0530
Subject: [PATCH v2] hostapd: add Transmit Power Envelope IE
In-Reply-To: <20151126190321.GA29401@w1.fi>
References: <1448284226-8036-1-git-send-email-rmanohar@qti.qualcomm.com>
 <20151126190321.GA29401@w1.fi>
Message-ID: <20151127093815.GA26393@rmanohar-arch.qca.qualcomm.com>

On Thu, Nov 26, 2015 at 09:03:22PM +0200, Jouni Malinen wrote:
> On Mon, Nov 23, 2015 at 06:40:26PM +0530, Rajkumar Manoharan wrote:
> > Add Transmit Power Envelope element defined in
> > IEEE P802.11-REVmc/D4.3, 8.4.2.161.
> 
> Thanks, applied.
>
> > diff --git a/src/ap/ieee802_11_vht.c b/src/ap/ieee802_11_vht.c
> > +u8 * hostapd_eid_vht_txpwr_env(struct hostapd_data *hapd, u8 *eid)
> 
> > +	max_tx_power = chan->max_tx_power - local_pwr_constraint;
> > +
> > +	/*
> > +	 * Local Maximum Transmit power is encoded as 2's complement
> > +	 * with a 0.5 dB step
> > +	 */
> > +	max_tx_power = ~(max_tx_power * 2) + 1;
> 
> Though, this does not look correct.. That would mess up positive values
> pretty badly. I think I fixed this, but anyway, please take a look at
> send a patch to update this, if needed.
>
your change looks much better that above logic. It also takes care of
special cases.

> > +	*eid++ = WLAN_EID_VHT_TRANSMIT_POWER_ENVELOPE;
> > +	*eid++ = 4;
> 
> That length value is not correct since this is now variable length:
> 
oops.. my bad.
> > +	/*
> > +	 * Max Transmit Power count and
> > +	 * Max Transmit Power units = 0 (EIRP)
> > +	 */
> > +	*eid++ = tx_pwr_count;
> > +
> > +	i = 0;
> > +	while (i++ <= tx_pwr_count)
> > +		*eid++ = max_tx_power;
> 
> Here.. Fixed the length field to match.
>
Sorry for the inconvenience.. Thanks a lot.

-Rajkumar


From u.oelmann at pengutronix.de  Fri Nov 27 03:40:37 2015
From: u.oelmann at pengutronix.de (=?UTF-8?q?Ulrich=20=C3=96lmann?=)
Date: Fri, 27 Nov 2015 12:40:37 +0100
Subject: [RFC v2 PATCH 2/2] wpa_supplicant: Enable Automatic Channel Selection
 support for AP mode
In-Reply-To: <1448624437-11250-1-git-send-email-u.oelmann@pengutronix.de>
References: <1448624437-11250-1-git-send-email-u.oelmann@pengutronix.de>
Message-ID: <1448624437-11250-3-git-send-email-u.oelmann@pengutronix.de>

From: Tomasz Bursztyka <tomasz.bursztyka at linux.intel.com>

Since hostapd supports ACS now, let's enable its support into
wpa_supplicant when going on AP mode.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka at linux.intel.com>
[u.oelmann at pengutronix.de: rebased series from hostap_2_1~944 to master]
[u.oelmann at pengutronix.de: adjusted added text in defconfig]
Signed-off-by: Ulrich ?lmann <u.oelmann at pengutronix.de>
---
 wpa_supplicant/Makefile      |  6 ++++++
 wpa_supplicant/ap.c          |  6 ++++++
 wpa_supplicant/config.c      |  3 +++
 wpa_supplicant/config_ssid.h | 12 ++++++++++++
 wpa_supplicant/defconfig     | 27 +++++++++++++++++++++++++++
 5 files changed, 54 insertions(+)

diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
index 0789d43..423b4ae 100644
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -884,6 +884,12 @@ OBJS += ../src/ap/peerkey_auth.o
 endif
 endif
 
+ifdef CONFIG_ACS
+CFLAGS += -DCONFIG_ACS
+OBJS += ../src/ap/acs.o
+LIBS += -lm
+endif
+
 ifdef CONFIG_PCSC
 # PC/SC interface for smartcards (USIM, GSM SIM)
 CFLAGS += -DPCSC_FUNCS -I/usr/include/PCSC
diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
index 27fa2a9..8f6b126 100644
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -210,6 +210,12 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s,
 
 	os_strlcpy(bss->iface, wpa_s->ifname, sizeof(bss->iface));
 
+#ifdef CONFIG_ACS
+	/* Setting channel to 0 in order to enable ACS */
+	if (ssid->acs)
+		conf->channel = 0;
+#endif
+
 	if (wpa_supplicant_conf_ap_ht(wpa_s, ssid, conf))
 		return -1;
 
diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index bdcfe9f..9cce335 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -1920,6 +1920,9 @@ static const struct parse_data ssid_fields[] = {
 	{ INT_RANGE(mixed_cell, 0, 1) },
 	{ INT_RANGE(frequency, 0, 65000) },
 	{ INT_RANGE(fixed_freq, 0, 1) },
+#ifdef CONFIG_ACS
+	{ INT_RANGE(acs, 0, 1) },
+#endif /* CONFIG_ACS */
 #ifdef CONFIG_MESH
 	{ FUNC(mesh_basic_rates) },
 	{ INT(dot11MeshMaxRetries) },
diff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h
index de8157a..b296826 100644
--- a/wpa_supplicant/config_ssid.h
+++ b/wpa_supplicant/config_ssid.h
@@ -431,6 +431,18 @@ struct wpa_ssid {
 	 */
 	int fixed_freq;
 
+#ifdef CONFIG_ACS
+	/**
+	 * ACS - Automatic Channel Selection for AP mode
+	 *
+	 * If present, it will be handled together with frequency.
+	 * frequency will be used to determine hardware mode only, when it is
+	 * used for both hardware mode and channel when used alone. This will
+	 * force the channel to be set to 0, thus enabling ACS.
+	 */
+	int acs;
+#endif /* CONFIG_ACS */
+
 	/**
 	 * mesh_basic_rates - BSS Basic rate set for mesh network
 	 *
diff --git a/wpa_supplicant/defconfig b/wpa_supplicant/defconfig
index e2e4bdc..216994c 100644
--- a/wpa_supplicant/defconfig
+++ b/wpa_supplicant/defconfig
@@ -513,3 +513,30 @@ CONFIG_PEERKEY=y
 
 # OS X builds. This is only for building eapol_test.
 #CONFIG_OSX=y
+
+# Automatic Channel Selection
+# This will allow wpa_supplicant to pick the channel automatically when channel
+# is set to "0".
+#
+# TODO: Extend parser to be able to parse "channel=acs_survey" as an alternative
+# to "channel=0". This would enable us to eventually add other ACS algorithms in
+# similar way.
+#
+# Automatic selection is currently only done through initialization, later on
+# we hope to do background checks to keep us moving to more ideal channels as
+# time goes by. ACS is currently only supported through the nl80211 driver and
+# your driver must have survey dump capability that is filled by the driver
+# during scanning.
+#
+# TODO: In analogy to hostapd be able to customize the ACS survey algorithm with
+# a newly to create wpa_supplicant.conf variable acs_num_scans.
+#
+# Supported ACS drivers:
+# * ath9k
+# * ath5k
+# * ath10k
+#
+# For more details refer to:
+# http://wireless.kernel.org/en/users/Documentation/acs
+#
+#CONFIG_ACS=y
-- 
2.1.4



From u.oelmann at pengutronix.de  Fri Nov 27 03:40:35 2015
From: u.oelmann at pengutronix.de (=?UTF-8?q?Ulrich=20=C3=96lmann?=)
Date: Fri, 27 Nov 2015 12:40:35 +0100
Subject: [RFC v2 PATCH 0/2] ACS support for wpa_supplicant in AP mode
Message-ID: <1448624437-11250-1-git-send-email-u.oelmann@pengutronix.de>

Hi there,

the following series has been posted on this list initially by Tomasz Bursztyka
on 2013-09-09 as "RFC v1" (see his mail below). Unfortunately there has not been
any reaction at all. As I wanted to use this feature I rebased Tomasz' patches,
made some adjustments to the text that he added to wpa_supplicant/defconfig and
here is "RFC v2".

To be able to utilize wpa_supplicant's ACS under control of NetworkManager I
created an additional NetworkManager patch against version 1.0.8 that is going
to be sent as a reply to this mail.

Ulrich


On Mon, Sep 9 03:30:47 PDT 2013, Tomasz Bursztyka wrote:
> Hi,
> 
> Here is a primary RFC for supporting ACS in wpa_supplicant in AP mode.
> Thanks to M. Kazior for his ACS implementation in hostapd core, such support for wpa_supplicant is
> therefore easy.
> 
> It's currently on an RFC stage, since it still requires some polishing, mostly on error handling.
> Currently if ACS works, everything will be fine. If not, there is no error reporting or fallback mechanism.
> My plan is to try adding a fallback mechanism, so it will try to use finally the given channel (or the default one).
> 
> (I will not be able to answer for 2 weeks, just to let know people who would have comments)
> 
> Br,


Tomasz Bursztyka (2):
  events: Handle survey event properly into wpa_supplicant
  wpa_supplicant: Enable Automatic Channel Selection support for AP mode

 src/ap/drv_callbacks.c       | 216 +++++++++++++++++++++----------------------
 src/ap/hostapd.h             |   4 +
 wpa_supplicant/Makefile      |   6 ++
 wpa_supplicant/ap.c          |   6 ++
 wpa_supplicant/config.c      |   3 +
 wpa_supplicant/config_ssid.h |  12 +++
 wpa_supplicant/defconfig     |  27 ++++++
 wpa_supplicant/events.c      |   7 ++
 8 files changed, 173 insertions(+), 108 deletions(-)

-- 
2.1.4



From u.oelmann at pengutronix.de  Fri Nov 27 03:40:36 2015
From: u.oelmann at pengutronix.de (=?UTF-8?q?Ulrich=20=C3=96lmann?=)
Date: Fri, 27 Nov 2015 12:40:36 +0100
Subject: [RFC v2 PATCH 1/2] events: Handle survey event properly into
 wpa_supplicant
In-Reply-To: <1448624437-11250-1-git-send-email-u.oelmann@pengutronix.de>
References: <1448624437-11250-1-git-send-email-u.oelmann@pengutronix.de>
Message-ID: <1448624437-11250-2-git-send-email-u.oelmann@pengutronix.de>

From: Tomasz Bursztyka <tomasz.bursztyka at linux.intel.com>

Let's reuse hostapd code for such handling. This will be useful to get
ACS support into wpa_supplicant where this one needs to handle the
survey event so it fills in the result ACS subsystem will require.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka at linux.intel.com>
[u.oelmann at pengutronix.de: rebased series from hostap_2_1~944 to master]
Signed-off-by: Ulrich ?lmann <u.oelmann at pengutronix.de>
---
 src/ap/drv_callbacks.c  | 216 ++++++++++++++++++++++++------------------------
 src/ap/hostapd.h        |   4 +
 wpa_supplicant/events.c |   7 ++
 3 files changed, 119 insertions(+), 108 deletions(-)

diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
index fd07201..c4846a0 100644
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -659,6 +659,114 @@ int hostapd_probe_req_rx(struct hostapd_data *hapd, const u8 *sa, const u8 *da,
 }
 
 
+static struct hostapd_channel_data * hostapd_get_mode_channel(
+	struct hostapd_iface *iface, unsigned int freq)
+{
+	int i;
+	struct hostapd_channel_data *chan;
+
+	for (i = 0; i < iface->current_mode->num_channels; i++) {
+		chan = &iface->current_mode->channels[i];
+		if (!chan)
+			return NULL;
+		if ((unsigned int) chan->freq == freq)
+			return chan;
+	}
+
+	return NULL;
+}
+
+
+static void hostapd_update_nf(struct hostapd_iface *iface,
+			      struct hostapd_channel_data *chan,
+			      struct freq_survey *survey)
+{
+	if (!iface->chans_surveyed) {
+		chan->min_nf = survey->nf;
+		iface->lowest_nf = survey->nf;
+	} else {
+		if (dl_list_empty(&chan->survey_list))
+			chan->min_nf = survey->nf;
+		else if (survey->nf < chan->min_nf)
+			chan->min_nf = survey->nf;
+		if (survey->nf < iface->lowest_nf)
+			iface->lowest_nf = survey->nf;
+	}
+}
+
+
+static void hostapd_single_channel_get_survey(struct hostapd_iface *iface,
+					      struct survey_results *survey_res)
+{
+	struct hostapd_channel_data *chan;
+	struct freq_survey *survey;
+	u64 divisor, dividend;
+
+	survey = dl_list_first(&survey_res->survey_list, struct freq_survey,
+			       list);
+	if (!survey || !survey->freq)
+		return;
+
+	chan = hostapd_get_mode_channel(iface, survey->freq);
+	if (!chan || chan->flag & HOSTAPD_CHAN_DISABLED)
+		return;
+
+	wpa_printf(MSG_DEBUG,
+		   "Single Channel Survey: (freq=%d channel_time=%ld channel_time_busy=%ld)",
+		   survey->freq,
+		   (unsigned long int) survey->channel_time,
+		   (unsigned long int) survey->channel_time_busy);
+
+	if (survey->channel_time > iface->last_channel_time &&
+	    survey->channel_time > survey->channel_time_busy) {
+		dividend = survey->channel_time_busy -
+			iface->last_channel_time_busy;
+		divisor = survey->channel_time - iface->last_channel_time;
+
+		iface->channel_utilization = dividend * 255 / divisor;
+		wpa_printf(MSG_DEBUG, "Channel Utilization: %d",
+			   iface->channel_utilization);
+	}
+	iface->last_channel_time = survey->channel_time;
+	iface->last_channel_time_busy = survey->channel_time_busy;
+}
+
+
+void hostapd_event_get_survey(struct hostapd_data *hapd,
+			      struct survey_results *survey_results)
+{
+	struct hostapd_iface *iface = hapd->iface;
+	struct freq_survey *survey, *tmp;
+	struct hostapd_channel_data *chan;
+
+	if (dl_list_empty(&survey_results->survey_list)) {
+		wpa_printf(MSG_DEBUG, "No survey data received");
+		return;
+	}
+
+	if (survey_results->freq_filter) {
+		hostapd_single_channel_get_survey(iface, survey_results);
+		return;
+	}
+
+	dl_list_for_each_safe(survey, tmp, &survey_results->survey_list,
+			      struct freq_survey, list) {
+		chan = hostapd_get_mode_channel(iface, survey->freq);
+		if (!chan)
+			continue;
+		if (chan->flag & HOSTAPD_CHAN_DISABLED)
+			continue;
+
+		dl_list_del(&survey->list);
+		dl_list_add_tail(&chan->survey_list, &survey->list);
+
+		hostapd_update_nf(iface, chan, survey);
+
+		iface->chans_surveyed++;
+	}
+}
+
+
 #ifdef HOSTAPD
 
 #ifdef CONFIG_IEEE80211R
@@ -946,114 +1054,6 @@ static void hostapd_event_eapol_rx(struct hostapd_data *hapd, const u8 *src,
 }
 
 
-static struct hostapd_channel_data * hostapd_get_mode_channel(
-	struct hostapd_iface *iface, unsigned int freq)
-{
-	int i;
-	struct hostapd_channel_data *chan;
-
-	for (i = 0; i < iface->current_mode->num_channels; i++) {
-		chan = &iface->current_mode->channels[i];
-		if (!chan)
-			return NULL;
-		if ((unsigned int) chan->freq == freq)
-			return chan;
-	}
-
-	return NULL;
-}
-
-
-static void hostapd_update_nf(struct hostapd_iface *iface,
-			      struct hostapd_channel_data *chan,
-			      struct freq_survey *survey)
-{
-	if (!iface->chans_surveyed) {
-		chan->min_nf = survey->nf;
-		iface->lowest_nf = survey->nf;
-	} else {
-		if (dl_list_empty(&chan->survey_list))
-			chan->min_nf = survey->nf;
-		else if (survey->nf < chan->min_nf)
-			chan->min_nf = survey->nf;
-		if (survey->nf < iface->lowest_nf)
-			iface->lowest_nf = survey->nf;
-	}
-}
-
-
-static void hostapd_single_channel_get_survey(struct hostapd_iface *iface,
-					      struct survey_results *survey_res)
-{
-	struct hostapd_channel_data *chan;
-	struct freq_survey *survey;
-	u64 divisor, dividend;
-
-	survey = dl_list_first(&survey_res->survey_list, struct freq_survey,
-			       list);
-	if (!survey || !survey->freq)
-		return;
-
-	chan = hostapd_get_mode_channel(iface, survey->freq);
-	if (!chan || chan->flag & HOSTAPD_CHAN_DISABLED)
-		return;
-
-	wpa_printf(MSG_DEBUG,
-		   "Single Channel Survey: (freq=%d channel_time=%ld channel_time_busy=%ld)",
-		   survey->freq,
-		   (unsigned long int) survey->channel_time,
-		   (unsigned long int) survey->channel_time_busy);
-
-	if (survey->channel_time > iface->last_channel_time &&
-	    survey->channel_time > survey->channel_time_busy) {
-		dividend = survey->channel_time_busy -
-			iface->last_channel_time_busy;
-		divisor = survey->channel_time - iface->last_channel_time;
-
-		iface->channel_utilization = dividend * 255 / divisor;
-		wpa_printf(MSG_DEBUG, "Channel Utilization: %d",
-			   iface->channel_utilization);
-	}
-	iface->last_channel_time = survey->channel_time;
-	iface->last_channel_time_busy = survey->channel_time_busy;
-}
-
-
-static void hostapd_event_get_survey(struct hostapd_data *hapd,
-				     struct survey_results *survey_results)
-{
-	struct hostapd_iface *iface = hapd->iface;
-	struct freq_survey *survey, *tmp;
-	struct hostapd_channel_data *chan;
-
-	if (dl_list_empty(&survey_results->survey_list)) {
-		wpa_printf(MSG_DEBUG, "No survey data received");
-		return;
-	}
-
-	if (survey_results->freq_filter) {
-		hostapd_single_channel_get_survey(iface, survey_results);
-		return;
-	}
-
-	dl_list_for_each_safe(survey, tmp, &survey_results->survey_list,
-			      struct freq_survey, list) {
-		chan = hostapd_get_mode_channel(iface, survey->freq);
-		if (!chan)
-			continue;
-		if (chan->flag & HOSTAPD_CHAN_DISABLED)
-			continue;
-
-		dl_list_del(&survey->list);
-		dl_list_add_tail(&chan->survey_list, &survey->list);
-
-		hostapd_update_nf(iface, chan, survey);
-
-		iface->chans_surveyed++;
-	}
-}
-
-
 #ifdef NEED_AP_MLME
 
 static void hostapd_event_iface_unavailable(struct hostapd_data *hapd)
diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
index 8161a59..4548f65 100644
--- a/src/ap/hostapd.h
+++ b/src/ap/hostapd.h
@@ -506,4 +506,8 @@ void fst_hostapd_fill_iface_obj(struct hostapd_data *hapd,
 				struct fst_wpa_obj *iface_obj);
 #endif /* CONFIG_FST */
 
+struct survey_results;
+void hostapd_event_get_survey(struct hostapd_data *hapd,
+			      struct survey_results *survey_results);
+
 #endif /* HOSTAPD_H */
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 5afe94f..4f57d6c 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -3924,6 +3924,13 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
 				     data->mesh_peer.ie_len);
 #endif /* CONFIG_MESH */
 		break;
+	case EVENT_SURVEY: {
+		struct hostapd_data hapd = {};
+		hapd.iface = wpa_s->ap_iface;
+
+		hostapd_event_get_survey(&hapd, &data->survey_results);
+		break;
+		}
 	default:
 		wpa_msg(wpa_s, MSG_INFO, "Unknown event %d", event);
 		break;
-- 
2.1.4



From u.oelmann at pengutronix.de  Fri Nov 27 03:42:53 2015
From: u.oelmann at pengutronix.de (=?UTF-8?q?Ulrich=20=C3=96lmann?=)
Date: Fri, 27 Nov 2015 12:42:53 +0100
Subject: [NetworkManager-1.0.8 PATCH] wpa_supplicant: request ACS if channel==0
In-Reply-To: <1448624437-11250-1-git-send-email-u.oelmann@pengutronix.de>
References: <1448624437-11250-1-git-send-email-u.oelmann@pengutronix.de>
Message-ID: <1448624573-12147-1-git-send-email-u.oelmann@pengutronix.de>

By analogy to wpa_supplicant.conf Active Channel Selection (ACS) is coded as
"channel=0" within a connection.

Signed-off-by: Ulrich ?lmann <u.oelmann at pengutronix.de>
---
 src/supplicant-manager/nm-supplicant-config.c          | 13 +++++++++++++
 src/supplicant-manager/nm-supplicant-settings-verify.c |  1 +
 2 files changed, 14 insertions(+)

diff --git a/src/supplicant-manager/nm-supplicant-config.c b/src/supplicant-manager/nm-supplicant-config.c
index 692efef..c722966 100644
--- a/src/supplicant-manager/nm-supplicant-config.c
+++ b/src/supplicant-manager/nm-supplicant-config.c
@@ -381,6 +381,19 @@ nm_supplicant_config_add_setting_wireless (NMSupplicantConfig * self,
 			nm_log_warn (LOGD_SUPPLICANT, "Error adding mode=2 (ap) to supplicant config.");
 			return FALSE;
 		}
+
+		/* By analogy to wpa_supplicant.conf Active Channel Selection (ACS) has
+		 * to be coded as "channel=0" within the connection - wpa_supplicant
+		 * does not need a frequency then.
+		 */
+		if (!nm_setting_wireless_get_channel (setting)) {
+			if (!nm_supplicant_config_add_option (self, "acs", "1", -1, FALSE)) {
+				nm_log_warn (LOGD_SUPPLICANT, "Error adding acs=1 (enable active channel selection) to supplicant config.");
+				return FALSE;
+			}
+
+			fixed_freq = 0;
+		}
 	}
 
 	if ((is_adhoc || is_ap) && fixed_freq) {
diff --git a/src/supplicant-manager/nm-supplicant-settings-verify.c b/src/supplicant-manager/nm-supplicant-settings-verify.c
index 1328fd5..68bc66b 100644
--- a/src/supplicant-manager/nm-supplicant-settings-verify.c
+++ b/src/supplicant-manager/nm-supplicant-settings-verify.c
@@ -94,6 +94,7 @@ static const struct Opt opt_table[] = {
 	{ "bssid",              TYPE_KEYWORD, 0, 0, FALSE,  NULL },
 	{ "scan_ssid",          TYPE_INT,     0, 1, FALSE,  NULL },
 	{ "mode",               TYPE_INT,     0, 2, FALSE,  NULL },
+	{ "acs",                TYPE_INT,     0, 1, FALSE,  NULL },
 	{ "frequency",          TYPE_INT,     2412, 5825, FALSE,  NULL },
 	{ "auth_alg",           TYPE_KEYWORD, 0, 0, FALSE,  auth_alg_allowed },
 	{ "psk",                TYPE_BYTES,   0, 0, FALSE,  NULL },
-- 
2.1.4



From johannes at sipsolutions.net  Fri Nov 27 05:12:14 2015
From: johannes at sipsolutions.net (Johannes Berg)
Date: Fri, 27 Nov 2015 14:12:14 +0100
Subject: [PATCH] tests: vm: output everything on console
Message-ID: <1448629934-30526-1-git-send-email-johannes@sipsolutions.net>

From: Johannes Berg <johannes.berg at intel.com>

When running tests, make printk put all messages, including debug
messages, onto the serial console to go into the console file.

Signed-off-by: Johannes Berg <johannes.berg at intel.com>
---
 tests/hwsim/vm/inside.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/hwsim/vm/inside.sh b/tests/hwsim/vm/inside.sh
index 60398081317c..a060bc5dc11e 100755
--- a/tests/hwsim/vm/inside.sh
+++ b/tests/hwsim/vm/inside.sh
@@ -14,6 +14,8 @@ mount debugfs -t debugfs /sys/kernel/debug
 
 export PATH=/usr/sbin:$PATH
 
+echo 8 8 8 8 > /proc/sys/kernel/printk
+
 # reboot on any sort of crash
 sysctl kernel.panic_on_oops=1
 sysctl kernel.panic=1
-- 
2.6.2



From johannes at sipsolutions.net  Fri Nov 27 05:15:26 2015
From: johannes at sipsolutions.net (Johannes Berg)
Date: Fri, 27 Nov 2015 14:15:26 +0100
Subject: [PATCH] tests: add tests for HS 2.0 frame filtering
Message-ID: <1448630126-31605-1-git-send-email-johannes@sipsolutions.net>

From: Johannes Berg <johannes.berg at intel.com>

Signed-off-by: Johannes Berg <johannes.berg at intel.com>
---
This requires four kernel patches that I've posted, so far
I haven't heard anything about them.
---
 tests/hwsim/test_ap_hs20.py     |   7 +-
 tests/hwsim/test_hs20_filter.py | 218 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 221 insertions(+), 4 deletions(-)
 create mode 100644 tests/hwsim/test_hs20_filter.py

diff --git a/tests/hwsim/test_ap_hs20.py b/tests/hwsim/test_ap_hs20.py
index e7c818cae912..97d13f89abdb 100644
--- a/tests/hwsim/test_ap_hs20.py
+++ b/tests/hwsim/test_ap_hs20.py
@@ -2876,7 +2876,7 @@ def send_ns(dev, src_ll=None, target=None, ip_src=None, ip_dst=None, opt=None,
     if "OK" not in dev.request(cmd + binascii.hexlify(pkt)):
         raise Exception("DATA_TEST_FRAME failed")
 
-def build_na(src_ll, ip_src, ip_dst, target, opt=None):
+def build_na(src_ll, ip_src, ip_dst, target, opt=None, flags=0):
     link_mc = binascii.unhexlify("3333ff000002")
     _src_ll = binascii.unhexlify(src_ll.replace(':',''))
     proto = '\x86\xdd'
@@ -2884,12 +2884,11 @@ def build_na(src_ll, ip_src, ip_dst, target, opt=None):
     _ip_src = socket.inet_pton(socket.AF_INET6, ip_src)
     _ip_dst = socket.inet_pton(socket.AF_INET6, ip_dst)
 
-    reserved = '\x00\x00\x00\x00'
     _target = socket.inet_pton(socket.AF_INET6, target)
     if opt:
-        payload = reserved + _target + opt
+        payload = struct.pack('>Bxxx', flags) + _target + opt
     else:
-        payload = reserved + _target
+        payload = struct.pack('>Bxxx', flags) + _target
     icmp = build_icmpv6(_ip_src + _ip_dst, 136, 0, payload)
 
     ipv6 = struct.pack('>BBBBHBB', 0x60, 0, 0, 0, len(icmp), 58, 255)
diff --git a/tests/hwsim/test_hs20_filter.py b/tests/hwsim/test_hs20_filter.py
new file mode 100644
index 000000000000..d17b03fb4319
--- /dev/null
+++ b/tests/hwsim/test_hs20_filter.py
@@ -0,0 +1,218 @@
+# Hotspot 2.0 filtering tests
+# Copyright (c) 2015, Intel Deutschland GmbH
+#
+# This software may be distributed under the terms of the BSD license.
+# See README for more details.
+
+import hostapd
+import hwsim_utils
+import socket
+import subprocess
+import binascii
+from utils import HwsimSkip, require_under_vm
+import os
+import time
+from test_ap_hs20 import build_arp, build_na
+import struct
+
+class IPAssign(object):
+    def __init__(self, iface, addr, ipv6=False):
+        self._iface = iface
+        self._addr = addr
+        self._cmd = ['ip']
+        if ipv6:
+            self._cmd.append('-6')
+        self._cmd.append('addr')
+        self._ipv6 = ipv6
+    def __enter__(self):
+        subprocess.call(self._cmd + ['add', self._addr, 'dev', self._iface])
+        if self._ipv6:
+            # wait for DAD to finish
+            while True:
+                o = subprocess.check_output(self._cmd + ['show', 'tentative', 'dev', self._iface])
+                if not self._addr in o:
+                    break
+                time.sleep(0.1)
+    def __exit__(self, type, value, traceback):
+        subprocess.call(self._cmd + ['del', self._addr, 'dev', self._iface])
+
+def _test_ip4_gtk_drop(devs, apdevs, params, dst):
+    require_under_vm()
+    dev = devs[0]
+    procfile = '/proc/sys/net/ipv4/conf/%s/drop_unicast_in_l2_multicast' % dev.ifname
+    if not os.path.exists(procfile):
+        raise HwsimSkip("kernel doesn't have capability")
+
+    ap_params = { 'ssid': 'open', 'channel': '5' }
+    hapd = hostapd.add_ap(apdevs[0]['ifname'], ap_params)
+    dev.connect('open', key_mgmt="NONE", scan_freq="2432")
+
+    with IPAssign(dev.ifname, '10.0.0.1/24'):
+        s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+        s.bind(("10.0.0.1", 12345))
+        s.settimeout(0.1)
+
+        pkt = dst
+        pkt += hapd.own_addr().replace(':', '')
+        pkt += '0800'
+        pkt += '45000020786840004011ae600a0000040a000001'
+        pkt += '30393039000c0000'
+        pkt += '61736466' # "asdf"
+        if "OK" not in hapd.request('DATA_TEST_FRAME ' + pkt):
+            raise Exception("DATA_TEST_FRAME failed")
+
+        data, addr = s.recvfrom(1024)
+        if data != 'asdf':
+            raise Exception("invalid data received")
+
+        open(procfile, 'w').write('1')
+        try:
+            if "OK" not in hapd.request('DATA_TEST_FRAME ' + pkt):
+                raise Exception("DATA_TEST_FRAME failed")
+
+            try:
+                print s.recvfrom(1024)
+                raise Exception("erroneously received frame!")
+            except socket.timeout:
+                # this is the expected behaviour
+                pass
+        finally:
+            open(procfile, 'w').write('0')
+
+def test_ip4_gtk_drop_bcast(devs, apdevs, params):
+    _test_ip4_gtk_drop(devs, apdevs, params, dst='ffffffffffff')
+
+def test_ip4_gtk_drop_mcast(devs, apdevs, params):
+    _test_ip4_gtk_drop(devs, apdevs, params, dst='ff0000000000')
+
+def _test_ip6_gtk_drop(devs, apdevs, params, dst):
+    require_under_vm()
+    dev = devs[0]
+    procfile = '/proc/sys/net/ipv6/conf/%s/drop_unicast_in_l2_multicast' % dev.ifname
+    if not os.path.exists(procfile):
+        raise HwsimSkip("kernel doesn't have capability")
+
+    ap_params = { 'ssid': 'open', 'channel': '5' }
+    hapd = hostapd.add_ap(apdevs[0]['ifname'], ap_params)
+    dev.connect('open', key_mgmt="NONE", scan_freq="2432")
+
+    with IPAssign(dev.ifname, 'fdaa::1/48', ipv6=True):
+        s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
+        s.bind(("fdaa::1", 12345))
+        s.settimeout(0.1)
+
+        pkt = dst
+        pkt += hapd.own_addr().replace(':', '')
+        pkt += '86dd'
+        pkt += '60000000000c1140fdaa0000000000000000000000000002fdaa0000000000000000000000000001'
+        pkt += '30393039000cde31'
+        pkt += '61736466' # "asdf"
+        if "OK" not in hapd.request('DATA_TEST_FRAME ' + pkt):
+            raise Exception("DATA_TEST_FRAME failed")
+
+        data, addr = s.recvfrom(1024)
+        if data != 'asdf':
+            raise Exception("invalid data received")
+
+        open(procfile, 'w').write('1')
+        try:
+            if "OK" not in hapd.request('DATA_TEST_FRAME ' + pkt):
+                raise Exception("DATA_TEST_FRAME failed")
+
+            try:
+                print s.recvfrom(1024)
+                raise Exception("erroneously received frame!")
+            except socket.timeout:
+                # this is the expected behaviour
+                pass
+        finally:
+            open(procfile, 'w').write('0')
+
+def test_ip6_gtk_drop_bcast(devs, apdevs, params):
+    _test_ip6_gtk_drop(devs, apdevs, params, dst='ffffffffffff')
+
+def test_ip6_gtk_drop_mcast(devs, apdevs, params):
+    _test_ip6_gtk_drop(devs, apdevs, params, dst='ff0000000000')
+
+def test_ip4_drop_gratuitous_arp(devs, apdevs, params):
+    require_under_vm()
+    dev = devs[0]
+    procfile = '/proc/sys/net/ipv4/conf/%s/drop_gratuitous_arp' % dev.ifname
+    if not os.path.exists(procfile):
+        raise HwsimSkip("kernel doesn't have capability")
+
+    ap_params = { 'ssid': 'open', 'channel': '5' }
+    hapd = hostapd.add_ap(apdevs[0]['ifname'], ap_params)
+    dev.connect('open', key_mgmt="NONE", scan_freq="2432")
+
+    with IPAssign(dev.ifname, '10.0.0.2/24'):
+        # add an entry that can be updated by gratuitous ARP
+        subprocess.call(['ip', 'neigh', 'add', '10.0.0.1', 'lladdr', '02:00:00:00:00:ff', 'nud', 'reachable', 'dev', dev.ifname])
+        # wait for lock-time
+        time.sleep(1)
+        try:
+            ap_addr = hapd.own_addr()
+            cl_addr = dev.own_addr()
+            pkt = build_arp(cl_addr, ap_addr, 2, ap_addr, '10.0.0.1', ap_addr, '10.0.0.1')
+            pkt = binascii.hexlify(pkt)
+
+            if "OK" not in hapd.request('DATA_TEST_FRAME ' + pkt):
+                raise Exception("DATA_TEST_FRAME failed")
+
+            if not hapd.own_addr() in subprocess.check_output(['ip', 'neigh', 'show']):
+                raise Exception("gratuitous ARP frame failed to update")
+
+            subprocess.call(['ip', 'neigh', 'replace', '10.0.0.1', 'lladdr', '02:00:00:00:00:ff', 'nud', 'reachable', 'dev', dev.ifname])
+            # wait for lock-time
+            time.sleep(1)
+
+            open(procfile, 'w').write('1')
+
+            if "OK" not in hapd.request('DATA_TEST_FRAME ' + pkt):
+                raise Exception("DATA_TEST_FRAME failed")
+
+            if hapd.own_addr() in subprocess.check_output(['ip', 'neigh', 'show']):
+                raise Exception("gratuitous ARP frame updated erroneously")
+        finally:
+            subprocess.call(['ip', 'neigh', 'del', '10.0.0.1', 'dev', dev.ifname])
+            open(procfile, 'w').write('0')
+
+def test_ip6_drop_unsolicited_na(devs, apdevs, params):
+    require_under_vm()
+    dev = devs[0]
+    procfile = '/proc/sys/net/ipv6/conf/%s/drop_unsolicited_na' % dev.ifname
+    if not os.path.exists(procfile):
+        raise HwsimSkip("kernel doesn't have capability")
+
+    ap_params = { 'ssid': 'open', 'channel': '5' }
+    hapd = hostapd.add_ap(apdevs[0]['ifname'], ap_params)
+    dev.connect('open', key_mgmt="NONE", scan_freq="2432")
+
+    with IPAssign(dev.ifname, 'fdaa::1/48', ipv6=True):
+        # add an entry that can be updated by unsolicited NA
+        subprocess.call(['ip', '-6', 'neigh', 'add', 'fdaa::2', 'lladdr', '02:00:00:00:00:ff', 'nud', 'reachable', 'dev', dev.ifname])
+        try:
+            ap_addr = hapd.own_addr()
+            cl_addr = dev.own_addr()
+            pkt = build_na(ap_addr, 'fdaa::2', 'ff02::1', 'fdaa::2', flags=0x20,
+                           opt=binascii.unhexlify('0201' + ap_addr.replace(':', '')))
+            pkt = binascii.hexlify(pkt)
+
+            if "OK" not in hapd.request('DATA_TEST_FRAME ' + pkt):
+                raise Exception("DATA_TEST_FRAME failed")
+
+            if not hapd.own_addr() in subprocess.check_output(['ip', 'neigh', 'show']):
+                raise Exception("unsolicited NA frame failed to update")
+
+            subprocess.call(['ip', '-6', 'neigh', 'replace', 'fdaa::2', 'lladdr', '02:00:00:00:00:ff', 'nud', 'reachable', 'dev', dev.ifname])
+
+            open(procfile, 'w').write('1')
+
+            if "OK" not in hapd.request('DATA_TEST_FRAME ' + pkt):
+                raise Exception("DATA_TEST_FRAME failed")
+
+            if hapd.own_addr() in subprocess.check_output(['ip', 'neigh', 'show']):
+                raise Exception("unsolicited NA frame updated erroneously")
+        finally:
+            subprocess.call(['ip', '-6', 'neigh', 'del', 'fdaa::2', 'dev', dev.ifname])
+            open(procfile, 'w').write('0')
-- 
2.6.2



From johannes at sipsolutions.net  Fri Nov 27 05:53:37 2015
From: johannes at sipsolutions.net (Johannes Berg)
Date: Fri, 27 Nov 2015 14:53:37 +0100
Subject: [PATCH] tests: add a simple wmediumd test
Message-ID: <1448632417-25314-1-git-send-email-johannes@sipsolutions.net>

From: Johannes Berg <johannes.berg at intel.com>

If wmediumd is available on the path, test that it can forward
packets between two virtual nodes and that stopping it makes
the regular in-kernel datapath do the needed work again.

Signed-off-by: Johannes Berg <johannes.berg at intel.com>
---
 tests/hwsim/test_wmediumd.py | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 tests/hwsim/test_wmediumd.py

diff --git a/tests/hwsim/test_wmediumd.py b/tests/hwsim/test_wmediumd.py
new file mode 100644
index 000000000000..36ddba77cc4d
--- /dev/null
+++ b/tests/hwsim/test_wmediumd.py
@@ -0,0 +1,44 @@
+# PeerKey tests
+# Copyright (c) 2015, Intel Deutschland GmbH
+#
+# This software may be distributed under the terms of the BSD license.
+# See README for more details.
+
+import tempfile, os, subprocess, errno
+from utils import HwsimSkip
+from test_ap_open import test_ap_open
+
+CFG = """
+ifaces :
+{
+    ids = ["%s", "%s" ];
+    links = (
+        (0, 1, 30)
+    );
+};
+"""
+
+def test_wmediumd_simple(dev, apdev):
+    """test a simple wmediumd configuration"""
+    fd, fn = tempfile.mkstemp()
+    try:
+        f = os.fdopen(fd, 'w')
+        f.write(CFG % (apdev[0]['bssid'], dev[0].own_addr()))
+        f.close()
+        try:
+            p = subprocess.Popen(['wmediumd', '-c', fn],
+                                 stdout=open('/dev/null', 'a'),
+                                 stderr=subprocess.STDOUT)
+        except OSError, e:
+            if e.errno == errno.ENOENT:
+                raise HwsimSkip("wmediumd not available")
+            raise
+        try:
+            test_ap_open(dev, apdev)
+        finally:
+            p.terminate()
+            p.wait()
+        # test that releasing hwsim works correctly
+        test_ap_open(dev, apdev);
+    finally:
+        os.unlink(fn)
-- 
2.6.2



From johannes at sipsolutions.net  Fri Nov 27 06:41:37 2015
From: johannes at sipsolutions.net (Johannes Berg)
Date: Fri, 27 Nov 2015 15:41:37 +0100
Subject: [PATCH v2] tests: add a simple wmediumd test
Message-ID: <1448635297-26272-1-git-send-email-johannes@sipsolutions.net>

From: Johannes Berg <johannes.berg at intel.com>

If wmediumd is available on the path, test that it can forward
packets between two virtual nodes and that stopping it makes
the regular in-kernel datapath do the needed work again.

Signed-off-by: Johannes Berg <johannes.berg at intel.com>
---
 tests/hwsim/test_wmediumd.py | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 tests/hwsim/test_wmediumd.py

diff --git a/tests/hwsim/test_wmediumd.py b/tests/hwsim/test_wmediumd.py
new file mode 100644
index 000000000000..dd52f672ba7d
--- /dev/null
+++ b/tests/hwsim/test_wmediumd.py
@@ -0,0 +1,44 @@
+# wmediumd sanity checks
+# Copyright (c) 2015, Intel Deutschland GmbH
+#
+# This software may be distributed under the terms of the BSD license.
+# See README for more details.
+
+import tempfile, os, subprocess, errno
+from utils import HwsimSkip
+from test_ap_open import test_ap_open
+
+CFG = """
+ifaces :
+{
+    ids = ["%s", "%s" ];
+    links = (
+        (0, 1, 30)
+    );
+};
+"""
+
+def test_wmediumd_simple(dev, apdev):
+    """test a simple wmediumd configuration"""
+    fd, fn = tempfile.mkstemp()
+    try:
+        f = os.fdopen(fd, 'w')
+        f.write(CFG % (apdev[0]['bssid'], dev[0].own_addr()))
+        f.close()
+        try:
+            p = subprocess.Popen(['wmediumd', '-c', fn],
+                                 stdout=open('/dev/null', 'a'),
+                                 stderr=subprocess.STDOUT)
+        except OSError, e:
+            if e.errno == errno.ENOENT:
+                raise HwsimSkip("wmediumd not available")
+            raise
+        try:
+            test_ap_open(dev, apdev)
+        finally:
+            p.terminate()
+            p.wait()
+        # test that releasing hwsim works correctly
+        test_ap_open(dev, apdev);
+    finally:
+        os.unlink(fn)
-- 
2.6.2



From j at w1.fi  Fri Nov 27 10:37:35 2015
From: j at w1.fi (Jouni Malinen)
Date: Fri, 27 Nov 2015 20:37:35 +0200
Subject: Client reboots, can't reconnect for 5-8 minutes?
In-Reply-To: <BLU436-SMTP260A373C4322B6029B75A94B2060@phx.gbl>
References: <BLU436-SMTP534EE2FD9DE25AB5C08EF0B2070@phx.gbl>
 <20151123211445.GA8864@w1.fi>
 <BLU436-SMTP260A373C4322B6029B75A94B2060@phx.gbl>
Message-ID: <20151127183735.GA21558@w1.fi>

On Tue, Nov 24, 2015 at 12:54:38PM -0800, Frank Rizzo wrote:
> I was using the 3.13.0-68 version of the kernel on Ubuntu.  (Which
> is the version that exhibited this problem).  I just updated to
> 3.19.0-33 version, and the problem went AWAY.  Not sure if this is
> because of an updated wireless driver, or what.  But figured I'd
> pass that along.  It might help someone in the future.

My guess would be on the wireless driver.. The logcat files and hostapd
debug log you sent show that after tablet reboot the AP is receiving
Authentication frames from the tablet and hostapd is trying to respond
to them. However, it looks like the response frame does not delivered to
the tablet for some reason. Based on the comment on restarting hostapd
fixing this, I'd guess that the old driver version was unable to send
out Authentication frame properly when the old association and
encryption key was configured.

-- 
Jouni Malinen                                            PGP id EFC895FA


From johannes at sipsolutions.net  Fri Nov 27 10:54:58 2015
From: johannes at sipsolutions.net (Johannes Berg)
Date: Fri, 27 Nov 2015 19:54:58 +0100
Subject: [PATCH] tests: run-tests: print more details about NameError
Message-ID: <1448650498-7747-1-git-send-email-johannes@sipsolutions.net>

From: Johannes Berg <johannes.berg at intel.com>

If encountering a NameError, print the entire traceback so that
it's actually debuggable.

Signed-off-by: Johannes Berg <johannes.berg at intel.com>
---
 tests/hwsim/run-tests.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/hwsim/run-tests.py b/tests/hwsim/run-tests.py
index c55ed8323698..ec328127304e 100755
--- a/tests/hwsim/run-tests.py
+++ b/tests/hwsim/run-tests.py
@@ -453,6 +453,11 @@ def main():
             except HwsimSkip, e:
                 logger.info("Skip test case: %s" % e)
                 result = "SKIP"
+            except NameError, e:
+                import traceback
+                logger.info(e)
+                traceback.print_exc()
+                result = "FAIL"
             except Exception, e:
                 logger.info(e)
                 if args.loglevel == logging.WARNING:
-- 
2.6.2



From thefrankrizzo at hotmail.com  Fri Nov 27 11:00:44 2015
From: thefrankrizzo at hotmail.com (Frank Rizzo)
Date: Fri, 27 Nov 2015 11:00:44 -0800
Subject: Client reboots, can't reconnect for 5-8 minutes?
In-Reply-To: <20151127183735.GA21558@w1.fi>
References: <BLU436-SMTP534EE2FD9DE25AB5C08EF0B2070@phx.gbl>
 <20151123211445.GA8864@w1.fi>
 <BLU436-SMTP260A373C4322B6029B75A94B2060@phx.gbl>
 <20151127183735.GA21558@w1.fi>
Message-ID: <BLU436-SMTP1723A6B8BC378098F148A3CB2030@phx.gbl>

This would make sense considering that I updated the kernel on the host,  
and it went away.

Thanks for your help Jouni.

-Frank


On Fri, 27 Nov 2015 10:37:35 -0800, Jouni Malinen <j at w1.fi> wrote:

> On Tue, Nov 24, 2015 at 12:54:38PM -0800, Frank Rizzo wrote:
>> I was using the 3.13.0-68 version of the kernel on Ubuntu.  (Which
>> is the version that exhibited this problem).  I just updated to
>> 3.19.0-33 version, and the problem went AWAY.  Not sure if this is
>> because of an updated wireless driver, or what.  But figured I'd
>> pass that along.  It might help someone in the future.
>
> My guess would be on the wireless driver.. The logcat files and hostapd
> debug log you sent show that after tablet reboot the AP is receiving
> Authentication frames from the tablet and hostapd is trying to respond
> to them. However, it looks like the response frame does not delivered to
> the tablet for some reason. Based on the comment on restarting hostapd
> fixing this, I'd guess that the old driver version was unable to send
> out Authentication frame properly when the old association and
> encryption key was configured.


From j at w1.fi  Fri Nov 27 13:25:27 2015
From: j at w1.fi (Jouni Malinen)
Date: Fri, 27 Nov 2015 23:25:27 +0200
Subject: [PATCH] tests: honour HWSIM_TEST_LOG_DIR variable
In-Reply-To: <1448383198-4354-1-git-send-email-johannes@sipsolutions.net>
References: <1448383198-4354-1-git-send-email-johannes@sipsolutions.net>
Message-ID: <20151127212527.GA25125@w1.fi>

On Tue, Nov 24, 2015 at 05:39:58PM +0100, Johannes Berg wrote:
> If /tmp has a relatively small size limit, or multiple people run the
> tests on the same machine, using the same output directory can easily
> cause problems.
> 
> Make the test framework honour the new HWSIM_TEST_LOG_DIR environment
> variable to make it easier to avoid those problems.

Thanks, applied.
 
-- 
Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Fri Nov 27 13:26:51 2015
From: j at w1.fi (Jouni Malinen)
Date: Fri, 27 Nov 2015 23:26:51 +0200
Subject: [PATCH v2] tests: add a simple wmediumd test
In-Reply-To: <1448635297-26272-1-git-send-email-johannes@sipsolutions.net>
References: <1448635297-26272-1-git-send-email-johannes@sipsolutions.net>
Message-ID: <20151127212651.GB25125@w1.fi>

On Fri, Nov 27, 2015 at 03:41:37PM +0100, Johannes Berg wrote:
> If wmediumd is available on the path, test that it can forward
> packets between two virtual nodes and that stopping it makes
> the regular in-kernel datapath do the needed work again.

Thanks, applied with a small fix:

> diff --git a/tests/hwsim/test_wmediumd.py b/tests/hwsim/test_wmediumd.py
> @@ -0,0 +1,44 @@
> +from test_ap_open import test_ap_open

This is problematic due to the way the list of test cases is generated.
'ap_open' ends up in that list twice with this and that test case ends
up getting executed twice. I replaced this with a helper function that
does not start with the magic 'test_' prefix.

-- 
Jouni Malinen                                            PGP id EFC895FA


From anjalik at iwavesystems.com  Sat Nov 28 04:27:09 2015
From: anjalik at iwavesystems.com (anjalik at iwavesystems.com)
Date: Sat, 28 Nov 2015 07:27:09 -0500
Subject: WPS DISCONNECT ISSUE
Message-ID: <20151128072709.11621rqc7r3h5g2l@iwavesystems.com>

Hi ,

  I am facing an issue while testing the WPS Push button in Android ,  
the connection is fine ,but disconnecting suddenly. The sniffer  
capture says "Unspecified reason" as the cause for deauthentication.  
Also the sequence number seems to be litte different from the working  
case

Authenticator sends EAPOL key packet with sequence number 0 ,  
supplicant sends EAPOL Key packet back to authenticator with sequence  
number 1.(It IS zero in working case).

I am attaching the log along with the mail.


Thanks & Regads,
Anjali
-------------- next part --------------
D/wpa_supplicant(  648):    selected based on WPS IE (Active PBC)
D/wpa_supplicant(  648): wlan0:    selected BSS 98:fc:12:d9:a1:f7 ssid='Nippon1'
D/wpa_supplicant(  648): WPS: Check whether PBC session overlap is present in scan results; selected BSSID 98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): WPS: UUID of the selected BSS - hexdump(len=16): 00 00 00 00 00 00 00 01 10 00 98 fc 12 d9 a1 f7
D/wpa_supplicant(  648): wlan0: Considering connect request: reassociate: 1  selected: 98:fc:12:d9:a1:f7 bssid: 00:00:00:00:00:00  pending: 00:00:00:00:00:00  wpa_state: SCANNING  ssid=0x76964380  current_ssid=0x0
D/wpa_supplicant(  648): wlan0: Request association with 98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): WPA: Unrecognized EAPOL-Key Key Data IE - hexdump(len=9): 00 07 4e 69 70 70 6f 6e 31
D/wpa_supplicant(  648): WPA: Unrecognized EAPOL-Key Key Data IE - hexdump(len=3): 03 01 01
D/wpa_supplicant(  648): WPA: RSN IE in EAPOL
D/wpa_supplicant(  648): WPA: Unrecognized EAPOL-Key Key Data IE - hexdump(len=3): 2a 01 00
E/WifiStateMachine(  438): Set Scan results called
D/wpa_supplicant(  648): WPA: Unrecognized EAPOL-Key Key Data IE - hexdump(len=24): 3d 16 01 08 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
D/wpa_supplicant(  648): TDLS: TDLS is allowed in the target BSS
I/wpa_supplicant(  648): wlan0: Trying to associate with 98:fc:12:d9:a1:f7 (SSID='Nippon1' freq=2412 MHz)
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant(  648): wlan0: Cancelling scan request
D/wpa_supplicant(  648): wlan0: WPA: clearing own WPA/RSN IE
D/wpa_supplicant(  648): wlan0: Automatic auth_alg selection: 0x1
D/wpa_supplicant(  648): WPS: Building WPS IE for (Re)Association Request
D/wpa_supplicant(  648): WPS:  * Version (hardcoded 0x10)
D/wpa_supplicant(  648): WPS:  Received Sequence number = 398* Request Type
D/wpa_supplicant(  648): WPS:  * Version2 (0x20)
D/wpa_supplicant(  648): wlan0: WPA: clearing AP WPA IE
D/wpa_supplicant(  648): wlan0: WPA: clearing AP RSN IE
D/wpa_supplicant(  648): wlan0: WPA: clearing own WPA/RSN IE
D/wpa_supplicant(  648): wlan0: No keys have been configured - skip key clearing
D/wpa_supplicant(  648): wlan0: State: SCANNING -> ASSOCIATING
D/wpa_supplicant(  648): wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
D/wpa_supplicant(  648): netlink: Operstate: linkmode=-1, operstate=5
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant(  648): Limit connection to BSSID 98:fc:12:d9:a1:f7 freq=2412 MHz based on scan results (bssid_set=0)
D/wpa_supplicant(  648): nl80211: Set mode ifindex 2 iftype 2 (STATION)
D/wpa_supplicant(  648): nl80211: Unsubscribe mgmt frames handle 0x7694f100 (mode change)
D/wpa_supplicant(  648): nl80211: Subscribe to mgmt frames with non-AP handle 0x7694f100
D/wpa_supplicant(  648): nl80211: Register frame type=0xd0 nl_handle=0x7694f100
D/wpa_supplicant(  648): nl80211: Register frame match - hexdump(len=1): 06
D/wpa_supplicant(  648): nl80211: Connect (ifindex=2)
D/wpa_supplicant(  648):   * bssid=98:fc:11:c9:a1:f7
D/wpa_supplicant(  648):   * freq=2412
D/wpa_supplicant(  648):   * SSID - hexdump(len=7): 4e 69 70 70 6f 6e 31
D/wpa_supplicant(  648):   * IEs - hexdump(len=26): dd 18 00 50 f2 04 10 4a 00 01 10 10 
Received Sequence number = 4013a 00 01 01 10 49 00 06 00 37 2a 00 01 20
D/wpa_supplicant(  648):   * Auth Type 0
D/wpa_supplicant(  648): nl80211: Connect request send successfully
D/wpa_supplicant(  648): wlan0: Setting authentication timeout: 10 sec 0 usec
D/wpa_supplicant(  648): EAPOL: External notification - EAP success=0
D/wpa_supplicant(  648): EAPOL: Supplicant port status: Unauthorized
D/wpa_supplicant(  648): nl80211: Set supplicant port unauthorized for 00:00:00:00:00:00
D/wpa_supplicant(  648): EAPOL: External notification - EAP fail=0
D/wpa_supplicant(  648): EAPOL: Supplicant port status: Unauthorized
D/wpa_supplicant(  648): nl80211: Set supplicant port unauthorized for 00:00:00:00:00:00
D/wpa_supplicant(  648): EAPOL: External notification - portControl=Auto
D/wpa_supplicant(  648): EAPOL: Supplicant port status: Unauthorized
D/wpa_supplicant(  648): nl80211: Set supplicant port unauthorized for 00:00:00:00:00:00
D/wpa_supplicant(  648): RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
D/wpa_supplicant(  648): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
D/wpa_supplicant(  648): nl80211: if_removed already cleared - ignore event
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: BSS RANGE=0- MASK=0x21987
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=25): 42 53 53 20 52 41 4e 47 45 3d 30 2d 20 4d 41 53 4b 3d 30 78 32 31 39 38 37
D/wpa_supplicant(  648): wlan0: Control interface command 'BSS RANGE=0- MASK=0x21987'
D/wpa_supplicant(  648): nl80211: Drv Event 46 (NL80211_CMD_CONNECT) received for wlan0
D/wpa_supplicant(  648): nl80211: Connect event
D/wpa_supplicant(  648): nl80211: Associated on 2412 MHz
D/wpa_supplicant(  648): nl80211: Associated with 98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): nl80211: Operating frequency for the associated BSS from scan results: 2412 MHz
D/wpa_supplicant(  648): wlan0: Event ASSOC (0) received
D/wpa_supplicant(  648): wlan0: Association info event
D/wpa_supplicant(  648): req_ies - hexdump(len=71): 03 00 00 07 4e 69 70 70 6f 6e 31 01 08 82 84 8b 96 0c 12 18 24 32 04 30 48 60 6c 2d 1a ee 12 03 ...
D/wpa_supplicant(  648): resp_ies - hexdump(len=91): 01 08 82 84 8b 0c 12 96 18 24 32 04 30 48 60 6c dd 09 00 03 7f 01 01 00 00 ff 7f 2d 1a 4c 10 1b ...
D/wpa_supplicant(  648): WPA: Unrecognized EAPOL-Key Key Data IE - hexdump(len=24): 3d 16 01 08 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
D/wpa_supplicant(  648): wlan0: freq=2412 MHz
D/wpa_supplicant(  648): wlan0: WPA: clearing own WPA/RSN IE
D/wpa_supplicant(  648): wlan0: State: ASSOCIATING -> ASSOCIATED
D/wpa_supplicant(  648): wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
D/wpa_supplicant(  648): netlink: Operstate: linkmode=-1, operstate=5
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 
Received Sequence number = 40577 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant(  648): wlan0: Associated to a new BSS: BSSID=98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): wlan0: No keys have been configured - skip key clearing
I/wpa_supplicant(  648): wlan0: Associated with 98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant(  648): wlan0: WPA: Association event - clear replay counter
D/wpa_supplicant(  648): wlan0: WPA: Clear old PTK
D/wpa_supplicant(  648): TDLS: Remove peers on association
D/wpa_supplicant(  648): EAPOL: External notification - portEnabled=0
D/wpa_supplicant(  648): EAPOL: Supplicant port status: Unauthorized
D/wpa_supplicant(  648): nl80211: Set supplicant port unauthorized for 98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): EAPOL: External notification - Received Sequence number = 406portValid=0
D/wpa_supplicant(  648): EAPOL: Supplicant port status: Unauthorized
D/wpa_supplicant(  648): nl80211: Set supplicant port unauthorized for 98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): EAPOL: External notification - portEnabled=1
D/wpa_supplicant(  648): EAPOL: SUPP_PAE entering state CONNECTING
D/wpa_supplicant(  648): EAPOL: enable timer tick
D/wpa_supplicant(  648): EAPOL: SUPP_BE entering state IDLE
D/wpa_supplicant(  648): EAP: EAP entering state INITIALIZE
D/wpa_supplicant(  648): EAP: EAP entering state IDLE
D/wpa_supplicant(  648): wlan0: Setting authentication timeout: 10 sec 0 usec
D/wpa_supplicant(  648): wlan0: Cancelling scan request
D/wpa_supplicant(  648): RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
D/wpa_supplicant(  648): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
D/wpa_supplicant(  648): nl80211: if_removed already cleared - ignore event
D/wpa_supplicant(  648): RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
D/wpa_supplicant(  648): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
D/WifiHW  (  438): COMMAND <3>Associated with 98:fc:12:d9:a1:f7 RECEIVED FROM WPA_SUPPLICANT SOCKET IFNAME=
D/WifiHW  (  438): COMMAND Associated with 98:fc:12:d9:a1:f7 SENDING TO THE UPPER LAYER IFNAME=
D/wpa_supplicant(  648): nl80211: if_removed already cleared - ignore event
D/wpa_supplicant(  648): RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
D/wpa_supplicant(  648): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
D/wpa_supplicant(  648): nl80211: if_removed already cleared - ignore event
D/wpa_supplicant(  648): RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
D/wpa_supplicant(  648): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
D/wpa_supplicant(  648): nl80211: Received Sequence number = 408if_removed already cleared - ignore event
D/wpa_supplicant(  648): EAPOL: startWhen --> 0
D/wpa_supplicant(  648): EAPOL: SUPP_PAE entering state CONNECTING
D/wpa_supplicant(  648): EAPOL: txStart
D/wpa_supplicant(  648): TX EAPOL: dst=98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): wlan0: RX EAPOL from 98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): wlan0: Setting authentication timeout: 70 sec 0 usec
D/wpa_supplicant(  648): EAPOL: Received EAP-Packet frame
D/wpa_supplicant(  648): EAPOL: SUPP_PAE entering state RESTART
D/wpa_supplicant(  648): EAP: EAP entering state INITIALIZE
D/wpa_supplicant(  648): EAP: EAP entering state IDLE
D/wpa_supplicant(  648): EAPOL: SUPP_PAE entering state AUTHENTICATING
D/wpa_supplicant(  648): EAPOL: SUPP_BE entering state REQUEST
D/wpa_supplicant(  648): EAPOL: getSuppRsp
D/wpa_supplicant(  648): EAP: EAP entering state RECEIVED
D/wpa_supplicant(  648): EAP: Received EAP-Request id=1 method=1 vendor=0 vendorMethod=0
D/wpa_supplicant(  648): EAP: EAP entering state IDENTITY
I/wpa_supplicant(  648): wlan0: CTRL-EVENT-EAP-STARTED EAP authentication started
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant(  648): EAP: Status notification: started (param=)
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant(  648): EAP: EAP-Request Identity data - hexdump(len=5): 68 65 6c 6c 6f
D/wpa_supplicant(  648): EAP: using real identity - hexdump(len=29): 57 46 41 2d 53 69 6d 70 6c 65 43 6f 6e 66 69 67 2d 45 6e 72 6f 6c 6c 65 65 2d 31 2d 30
D/wpa_supplicant(  648): EAP: EAP entering state SEND_RESPONSE
D/wpa_supplicant(  648): EAP: EAP entering state IDLE
D/wpa_supplicant(  648): EAPOL: SUPP_BE entering state RESPONSE
D/wpa_supplicant(  648): EAPOL: txSuppRsp
D/wpa_supplicant(  648): TX EAPOL: dst=98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): EAPOL: SUPP_BE entering state RECEIVE
D/wpa_supplicant(  648): wlan0: RX EAPOL from 98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): EAPOL: Received EAP-Packet frame
D/wpa_supplicant(  648): EAPOL: SUPP_BE entering state REQUEST
D/wpa_supplicant(  648): EAPOL: getSuppRsp
D/wpa_supplicant(  648): EAP: EAP entering state RECEIVED
D/wpa_supplicant(  648): EAP: Received EAP-Request id=3 method=254 vendor=14122 vendorMethod=1
D/wpa_supplicant(  648): EAP: EAP entering state GET_METHOD
I/wpa_supplicant(  648): wlan0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=1
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant(  648): EAP: Status notification: accept proposed method (param=WSC)
D/WifiHW  (  438): COMMAND <3>CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=1 RECEIVED FROM WPA_SUPPLICANT SOCKET IFNAME=
D/WifiHW  (  438): COMMAND CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=1 SENDING TO THE UPPER LAYER IFNAME=
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant(  648): EAP: Initialize selected EAP method: vendor 14122 method 1 (WSC)
D/WifiHW  (  438): COMMAND <3>CTRL-EVENT-EAP-STATUS status='accept proposed method' parameter='WSC' RECEIVED FROM WPA_SUPPLICANT SOCKET IFNAME=
D/WifiHW  (  438): COReceived Sequence number = 412MMAND CTRL-EVENT-EAP-STATUS status='accept proposed method' parameter='WSC' SENDING TO THE UPPER LAYER IFNAME=
D/wpa_supplicant(  648): EAP-WSC: Fragment size limit 1398
I/wpa_supplicant(  648): wlan0: CTRL-EVENT-EAP-METHOD EAP vendor 14122 method 1 (WSC) selected
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/WifiHW  (  438): COMMAND <3>CTRL-EVENT-EAP-METHOD EAP vendor 14122 method 1 (WSC) selected RECEIVED FROM WPA_SUPPLICANT SOCKET IFNAME=
D/WifiHW  (  438): COMMAND CTRL-EVENT-EAP-METHOD EAP vendor 14122 method 1 (WSC) selected SENDING TO THE UPPER LAYER IFNAME=
D/wpa_supplicant(  648): EAP: EAP entering state METHOD
D/wpa_supplicant(  648): EAP-WSC: Received packet: Op-Code 1 Flags 0x0 Message Length 0
D/wpa_supplicant(  648): EAP-WSC: Received start
D/wpa_supplicant(  648): EAP-WSC: WAIT_START -> MESG
D/wpa_supplicant(  648): WPS: Enrollee Nonce - hexdump(len=16): 62 77 69 7d ae a6 af 73 11 16 1d 22 35 f0 70 03
D/wpa_supplicant(  648): WPS: Building Message M1
D/wpa_su
Received Sequence number = 413pplicant(  648): WPS:  * Version (hardcoded 0x10)
D/wpa_supplicant(  648): WPS:  * Message Type (4)
D/wpa_supplicant(  648): WPS:  * UUID-E
D/wpa_supplicant(  648): WPS:  * MAC Address (00:01:76:40:1a:9d)
D/wpa_supplicant(  648): WPS:  * Enrollee Nonce
D/wpa_supplicant(  648): WPS:  * Public Key
D/wpa_supplicant(  648): WPS: Generate new DH keys
D/wpa_supplicant(  648): WPS: DH Private Key - hexdump(len=192): [REMOVED]
D/wpa_supplicant(  648): WPS: DH own Public Key - hexdump(len=192): 89 f8 0b db ae 3d a8 c6 c0 2f fc 4e cd cb a3 c0 90 e3 10 3b ae 1b 29 17 d3 3f 57 71 50 d3 b5 7e ...
D/wpa_supplicant(  648): WPS:  * Authentication Type Flags
D/wpa_supplicant(  648): WPS:  * Encryption Type Flags
D/wpa_supplicant(  648): WPS:  * Connection Type Flags
D/wpa_supplicant(  648): WPS:  * Config Methods (4288)
D/wpa_supplicant(  648): WPS:  * Wi-Fi Protected Setup State (1)
D/wpa_supplicant(  648): WPS:  * Manufacturer
D/wpa_supplicant(  648): WPS:  * Model Name
D/wpa_supplicant(  648): WPS:  * Model Number
D/wpa_supplicant(  648): WPS:  * Serial Number
D/wpa_supplicant(  648): WPS:  * Primary Device Type
D/wpa_supplicant( Received Sequence number = 414 648): WPS:  * Device Name
D/wpa_supplicant(  648): WPS:  * RF Bands (3)
D/wpa_supplicant(  648): WPS:  * Association State
D/wpa_supplicant(  648): WPS:  * Device Password ID (4)
D/wpa_supplicant(  648): WPS:  * Configuration Error (0)
D/wpa_supplicant(  648): WPS:  * OS Version
D/wpa_supplicant(  648): WPS:  * Version2 (0x20)
D/wpa_supplicant(  648): EAP-WSC: MESG -> MESG
D/wpa_supplicant(  648): EAP-WSC: Generating Response
D/wpa_supplicant(  648): EAP-WSC: Sending out 404 bytes (message sent completely)
D/wpa_supplicant(  648): EAP-WSC: MESG -> MESG
D/wpa_supplicant(  648): EAP: method process -> ignore=FALSE methodState=MAY_CONT decision=FAIL
D/wpa_supplicant(  648): EAP: EAP entering state SEND_RESPONSE
D/wpa_supplicant(  648): EAP: EAP entering state IDLE
D/wpa_supplicant(  648): EAPOL: SUPP_BE entering state RESPONSE
D/wpa_supplicant(  648): EAPOL: txSuppRsp
D/wpa_supplicant(  648): TX EAPOL: dst=98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): EAPOL: SUPP_BE entering state RECEIVE
D/wpa_supplicant(  648): wlan0: RX EAPOL from 98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): EAPOL: Received EAP-Packet frame
D/wpa_supplicant(  648): EAPOL: SUPP_BE ente
Received Sequence number = 415ring state REQUEST
D/wpa_supplicant(  648): EAPOL: getSuppRsp
D/wpa_supplicant(  648): EAP: EAP entering state RECEIVED
D/wpa_supplicant(  648): EAP: Received EAP-Request id=4 method=254 vendor=14122 vendorMethod=1
D/wpa_supplicant(  648): EAP: EAP entering state METHOD
D/wpa_supplicant(  648): EAP-WSC: Received packet: Op-Code 4 Flags 0x0 Message Length 0
D/wpa_supplicant(  648): WPS: Processing received message (len=556 op_code=4)
D/wpa_supplicant(  648): WPS: Received WSC_MSG
D/wpa_supplicant(  648): WPS: Received M2
D/wpa_supplicant(  648): WPS: Registrar Nonce - hexdump(len=16): 99 a9 94 60 6f 7d 42 71 16 8a dc 81 da 9a b8 5b
D/wpa_supplicant(  648): WPS: UUID-R - hexdump(len=16): 00 00 00 00 00 00 00 01 10 00 98 fc 11 c9 a1 f7
D/wpa_supplicant(  648): WPS: Device Password ID 4
D/wpa_supplicant(  648): WPS: DH Private Key - hexdump(len=192): [REMOVED]
D/wpa_supplicant(  648): WPS: DH peer Public Key - hexdump(len=192): b5 cb 94 13 ba a1 38 78 1c 8b de 32 78 c1 65 7f d5 3d 59 d8 cd 27 81 31 e5 f0 d9 0d 23 6c 18 f1 ...
D/wpa_supplicant(  648): WPS: DH shared key - hexdump(len=192): [REMOReceived Sequence number = 416VED]
D/wpa_supplicant(  648): WPS: DHKey - hexdump(len=32): [REMOVED]
D/wpa_supplicant(  648): WPS: KDK - hexdump(len=32): [REMOVED]
D/wpa_supplicant(  648): WPS: AuthKey - hexdump(len=32): [REMOVED]
D/wpa_supplicant(  648): WPS: KeyWrapKey - hexdump(len=16): [REMOVED]
D/wpa_supplicant(  648): WPS: EMSK - hexdump(len=32): [REMOVED]
D/wpa_supplicant(  648): WPS: Manufacturer - hexdump(len=64): 4c 69 6e 6b 73 79 73 20 43 6f 72 70 6f 72 61 74 69 6f 6e 00 00 00 00 00 00 00 00 00 00 00 00 00 ...
D/wpa_supplicant(  648): WPS: Model Name - hexdump(len=32): 57 52 54 31 32 30 4e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
D/wpa_supplicant(  648): WPS: Model Number - hexdump(len=32): 76 31 2e 30 2e 30 36 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
D/wpa_supplicant(  648): WPS: Serial Number - hexdump(len=32): 4a 55 54 30 30 4c 35 30 32 32 30 39 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
D/wpa_supplicant(  648): WPS: Primary Device Type: 6-0050F204-1
D/wpa_supplicant(  648): WPS: Device Name - hexdump(len=32): 57 69 72 65 6c 65 73 73 20 52 6f 75 74 65 72 28 
Received Sequence number = 41757 46 41 29 00 00 00 00 00 00 00 00 00 00 00 00
D/wpa_supplicant(  648): EAP-WSC: MESG -> MESG
D/wpa_supplicant(  648): WPS: Building Message M3
D/wpa_supplicant(  648): WPS: Device Password - hexdump(len=8): [REMOVED]
D/wpa_supplicant(  648): WPS: PSK1 - hexdump(len=16): [REMOVED]
D/wpa_supplicant(  648): WPS: PSK2 - hexdump(len=16): [REMOVED]
D/wpa_supplicant(  648): WPS:  * Version (hardcoded 0x10)
D/wpa_supplicant(  648): WPS:  * Message Type (7)
D/wpa_supplicant(  648): WPS:  * Registrar Nonce
D/wpa_supplicant(  648): WPS: E-S1 - hexdump(len=16): d7 ae a7 12 cf ea 83 c4 d6 58 86 91 df 4c 1e 7f
D/wpa_supplicant(  648): WPS: E-S2 - hexdump(len=16): df d7 00 cc 8c ae ef ba fc f4 b7 5a 29 43 2d ce
D/wpa_supplicant(  648): WPS:  * E-Hash1
D/wpa_supplicant(  648): WPS: E-Hash1 - hexdump(len=32): 13 51 69 0c 29 dd 1d 73 ab 2d a3 d1 b5 e6 70 4c 24 e3 0a 96 d0 8b ca e5 95 f6 e0 25 bc a7 b9 10
D/wpa_supplicant(  648): WPS:  * E-Hash2
D/wpa_supplicant(  648): WPS: E-Hash2 - hexdump(len=32): db b1 ab b8 4d cf 88 10 71 dd d7 2c 8d 69 6e 4d 53 7d d3 e5 52 3f 90 2e 58 12 9d ba 72 96 01 69
D/wpa_supplicant(  648): WPS:  * Version2 Received Sequence number = 418(0x20)
D/wpa_supplicant(  648): WPS:  * Authenticator
D/wpa_supplicant(  648): EAP-WSC: MESG -> MESG
D/wpa_supplicant(  648): EAP-WSC: Generating Response
D/wpa_supplicant(  648): EAP-WSC: Sending out 124 bytes (message sent completely)
D/wpa_supplicant(  648): EAP-WSC: MESG -> MESG
D/wpa_supplicant(  648): EAP: method process -> ignore=FALSE methodState=MAY_CONT decision=FAIL
D/wpa_supplicant(  648): EAP: EAP entering state SEND_RESPONSE
D/wpa_supplicant(  648): EAP: EAP entering state IDLE
D/wpa_supplicant(  648): EAPOL: SUPP_BE entering state RESPONSE
D/wpa_supplicant(  648): EAPOL: txSuppRsp
D/wpa_supplicant(  648): TX EAPOL: dst=98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): EAPOL: SUPP_BE entering state RECEIVE
D/wpa_supplicant(  648): wlan0: RX EAPOL from 98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): EAPOL: Received EAP-Packet frame
D/wpa_supplicant(  648): EAPOL: SUPP_BE entering state REQUEST
D/wpa_supplicant(  648): EAPOL: getSuppRsp
D/wpa_supplicant(  648): EAP: EAP entering state RECEIVED
D/wpa_supplicant(  648): EAP: Received EAP-Request id=5 method=254 vendor=14122 vendorMethod=1
Received Sequence number = 419
D/wpa_supplicant(  648): EAP: EAP entering state METHOD
D/wpa_supplicant(  648): EAP-WSC: Received packet: Op-Code 4 Flags 0x0 Message Length 0
D/wpa_supplicant(  648): WPS: Processing received message (len=182 op_code=4)
D/wpa_supplicant(  648): WPS: Received WSC_MSG
D/wpa_supplicant(  648): WPS: Received M4
D/wpa_supplicant(  648): WPS: R-Hash1 - hexdump(len=32): ed 2f 46 50 61 7b 26 ee da df 65 d7 1a 19 63 ea 49 93 ad fe 8a 31 da fc 31 73 4e 23 85 73 b0 fd
D/wpa_supplicant(  648): WPS: R-Hash2 - hexdump(len=32): 3a 28 79 23 0d d3 23 6c 0c 3a 35 82 13 23 0a 10 04 30 13 6d 58 14 cf 3a 2f 93 23 80 78 6c 68 05
D/wpa_supplicant(  648): WPS: Processing decrypted Encrypted Settings attribute
D/wpa_supplicant(  648): WPS: R-SNonce1 - hexdump(len=16): [REMOVED]
D/wpa_supplicant(  648): WPS: Registrar proved knowledge of the first half of the device password
D/wpa_supplicant(  648): EAP-WSC: MESG -> MESG
D/wpa_supplicant(  648): WPS: Building Message M5
D/wpa_supplicant(  648): WPS:  * Version (hardcoded 0x10)
D/wpa_supplicant(  648): WPS:  * Message Type (9)
D/wpa_supplicant(  648): WPS:  * Registrar Nonce
D/wpa_supplicant(  Received Sequence number = 420648): WPS:  * E-SNonce1
D/wpa_supplicant(  648): WPS:  * Key Wrap Authenticator
D/wpa_supplicant(  648): WPS:  * Encrypted Settings
D/wpa_supplicant(  648): WPS:  * Version2 (0x20)
D/wpa_supplicant(  648): WPS:  * Authenticator
D/wpa_supplicant(  648): EAP-WSC: MESG -> MESG
D/wpa_supplicant(  648): EAP-WSC: Generating Response
D/wpa_supplicant(  648): EAP-WSC: Sending out 120 bytes (message sent completely)
D/wpa_supplicant(  648): EAP-WSC: MESG -> MESG
D/wpa_supplicant(  648): EAP: method process -> ignore=FALSE methodState=MAY_CONT decision=FAIL
D/wpa_supplicant(  648): EAP: EAP entering state SEND_RESPONSE
D/wpa_supplicant(  648): EAP: EAP entering state IDLE
D/wpa_supplicant(  648): EAPOL: SUPP_BE entering state RESPONSE
D/wpa_supplicant(  648): EAPOL: txSuppRsp
D/wpa_supplicant(  648): TX EAPOL: dst=98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): EAPOL: SUPP_BE entering state RECEIVE
D/wpa_supplicant(  648): wlan0: RX EAPOL from 98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): EAPOL: Received EAP-Packet frame
D/wpa_supplicant(  648): EAPOL: SUPP_BE entering state REQUEST
D/wpa_supplicant(  648): EAPOL: getSuppRsp
D/wpa_su
Received Sequence number = 421pplicant(  648): EAP: EAP entering state RECEIVED
D/wpa_supplicant(  648): EAP: Received EAP-Request id=6 method=254 vendor=14122 vendorMethod=1
D/wpa_supplicant(  648): EAP: EAP entering state METHOD
D/wpa_supplicant(  648): EAP-WSC: Received packet: Op-Code 4 Flags 0x0 Message Length 0
D/wpa_supplicant(  648): WPS: Processing received message (len=110 op_code=4)
D/wpa_supplicant(  648): WPS: Received WSC_MSG
D/wpa_supplicant(  648): WPS: Received M6
D/wpa_supplicant(  648): WPS: Processing decrypted Encrypted Settings attribute
D/wpa_supplicant(  648): WPS: R-SNonce2 - hexdump(len=16): [REMOVED]
D/wpa_supplicant(  648): WPS: Registrar proved knowledge of the second half of the device password
D/wpa_supplicant(  648): EAP-WSC: MESG -> MESG
D/wpa_supplicant(  648): WPS: Building Message M7
D/wpa_supplicant(  648): WPS:  * Version (hardcoded 0x10)
D/wpa_supplicant(  648): WPS:  * Message Type (11)
D/wpa_supplicant(  648): WPS:  * Registrar Nonce
D/wpa_supplicant(  648): WPS:  * E-SNonce2
D/wpa_supplicant(  648): WPS:  * Key Wrap Authenticator
D/wpa_supplicant(  648): WPS:  * Encrypted Settings
D/wpa_supplicant(  648): Received Sequence number = 422WPS:  * Version2 (0x20)
D/wpa_supplicant(  648): WPS:  * Authenticator
D/wpa_supplicant(  648): EAP-WSC: MESG -> MESG
D/wpa_supplicant(  648): EAP-WSC: Generating Response
D/wpa_supplicant(  648): EAP-WSC: Sending out 120 bytes (message sent completely)
D/wpa_supplicant(  648): EAP-WSC: MESG -> MESG
D/wpa_supplicant(  648): EAP: method process -> ignore=FALSE methodState=MAY_CONT decision=FAIL
D/wpa_supplicant(  648): EAP: EAP entering state SEND_RESPONSE
D/wpa_supplicant(  648): EAP: EAP entering state IDLE
D/wpa_supplicant(  648): EAPOL: SUPP_BE entering state RESPONSE
D/wpa_supplicant(  648): EAPOL: txSuppRsp
D/wpa_supplicant(  648): TX EAPOL: dst=98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): EAPOL: SUPP_BE entering state RECEIVE
D/wpa_supplicant(  648): wlan0: RX EAPOL from 98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): EAPOL: Received EAP-Packet frame
D/wpa_supplicant(  648): EAPOL: SUPP_BE entering state REQUEST
D/wpa_supplicant(  648): EAPOL: getSuppRsp
D/wpa_supplicant(  648): EAP: EAP entering state RECEIVED
D/wpa_supplicant(  648): EAP: Received EAP-Request id=7 method=254 vendor=14122 vendorMethod=1
D/wpa_supplic
Received Sequence number = 423ant(  648): EAP: EAP entering state METHOD
D/wpa_supplicant(  648): EAP-WSC: Received packet: Op-Code 4 Flags 0x0 Message Length 0
D/wpa_supplicant(  648): WPS: Processing received message (len=142 op_code=4)
D/wpa_supplicant(  648): WPS: Received WSC_MSG
D/wpa_supplicant(  648): WPS: Received M8
D/wpa_supplicant(  648): WPS: Processing decrypted Encrypted Settings attribute
D/wpa_supplicant(  648): WPS: Received Credential
D/wpa_supplicant(  648): WPS: Process Credential
D/wpa_supplicant(  648): WPS: Network Index: 1
D/wpa_supplicant(  648): WPS: SSID - hexdump(len=7): 4e 69 70 70 6f 6e 31
D/wpa_supplicant(  648): WPS: Authentication Type: 0x20
D/wpa_supplicant(  648): WPS: Encryption Type: 0x8
D/wpa_supplicant(  648): WPS: Network Key Index: 1
D/wpa_supplicant(  648): WPS: Network Key - hexdump(len=10): [REMOVED]
D/wpa_supplicant(  648): WPS: MAC Address 98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): WPS: MAC Address in the Credential (98:fc:12:d9:a1:f7) does not match with own address (01:01:77:40:1a:9d)
I/wpa_supplicant(  648): wlan0: WPS-CRED-RECEIVED 
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 Received Sequence number = 4242f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/WifiHW  (  438): COMMAND <3>WPS-CRED-RECEIVED  RECEIVED FROM WPA_SUPPLICANT SOCKET IFNAME=
D/WifiHW  (  438): COMMAND WPS-CRED-RECEIVED  SENDING TO THE UPPER LAYER IFNAME=
D/wpa_supplicant(  648): WPS: Received Credential attribute - hexdump(len=61): [REMOVED]
D/wpa_supplicant(  648): WPS: SSID - hexdump(len=7): 4e 69 70 70 6f 6e 31
D/wpa_supplicant(  648): WPS: Authentication Type 0x20
D/wpa_supplicant(  648): WPS: Encryption Type 0x8
D/wpa_supplicant(  648): WPS: Network Key Index 1
D/wpa_supplicant(  648): WPS: Network Key - hexdump(len=10): [REMOVED]
D/wpa_supplicant(  648): WPS: MAC Address 98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): WPS: Replace WPS network block based on the received credential
D/wpa_supplicant(  648): WPS: AP found from BSS table
D/wpa_supplicant(  648): Remove duplicate network 8
D/wpa_supplicant(  648): Writing configuration file '/data/misc/wifi/wpa_supplicant.conf'
D/wpa_supplicant(  648): Configuration file '/data/misc/wifi/wpa_supplicant.conf' written successfully
D/wpa_supplicant(  648): EAP-WSC: MESG -> MESG
D/wpa_supplicant(  648): WPS: Building Message WSC_Done
D/wpa_supplicant(  648): WPS:  * Version (hardcoded 0x10)
D/wpa_supplicant(  648): WPS:  * Message Type (15)
D/wpa_supplicant(  648): WPS:  * Enrollee Nonce
D/wpa_supplicant(  648): WPS:  * Registrar Nonce
D/wpa_supplicant(  648): WPS:  * Version2 (0x20)
I/wpa_supplicant(  648): wlan0: WPS-SUCCESS 
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant(  648): EAP-WSC: MESG -> MESG
D/wpa_supplicant(  648): EAP-WSC: Generating Response
D/wpa_supplicant(  648): EAP-WSC: Sending out 60 bytes (message sent completely)
D/wpa_supplicant(  648): EAP-WSC: MESG -> FAIL
D/wpa_supplicant(  648): EAP: method process -> ignore=FALSE methodState=DONE decision=FAIL
D/wpa_supplicant(  648): EAP: EAP entering state SEND_RESPONSE
D/wpa_supplicant(  648): EAP: EAP entering state IDLE
D/wpa_supplicant(  648): EAPOL: SUPP_BE entering state RESPONSE
D/wpa_supplicant(  648): EAPOL: txSuppRsp
D/wpa_supplicant(  648): TX EAPOL: dst=98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): EAPOL: SUPP_BE entering state RECEIVE
E/WifiStateMachine(  438): handleMessage: X
D/wpa_supplicant(  648): EAPOL: idleWhile --> 0
D/wpa_supplicant(  648): EAP: EAP entering state FAILURE
I/wpa_supplicant(  648): wlan0: CTRL-EVENT-EAP-FAILURE EAP authentication failed
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant(  648): EAPOL: SUPP_PAE entering state HELD
D/wpa_supplicant(  648): EAPOL: Supplicant port status: Unauthorized
D/wpa_supplicant(  648): nl80211: Set supplicant port unauthorized for 98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): EAPOL: SUPP_BE entering state FAIL
D/wpa_supplicant(  648): EAPOL: SUPP_BE entering state IDLE
D/wpa_supplicant(  648): EAPOL authentication completed unsuccessfully
D/wpa_supplicant(  648): WPS: Network configuration replaced - try to associate with the received credential (freq=2412)
D/wpa_supplicant(  648): wlan0: Request to deauthenticate - bssid=98:fc:12:d9:a1:f7 pending_bssid=00:00:00:00:00:00 reason=3 state=ASSOCIATED
D/wpa_supplicant(  648): TDLS: Tear down peers
D/wpa_supplicant(  648): wpa_driver_nl80211_disconnect(reason_code=3)
E/        (  648): send_cfg80211: Calling CRDA to update world regulatory domain
D/wpa_supplicant(  648): wlan0: Event DEAUTH (12) received
D/wpa_supplicant(  648): wlan0: Deauthentication notification
D/wpa_supplicant(  648): wlan0:  * reason 3 (locally generated)
D/wpa_supplicant(  648): Deauthentication frame IE(s) - hexdump(len=0): [NULL]
I/wpa_supplicant(  648): wlan0: CTRL-EVENT-DISCONNECTED bssid=98:fc:12:d9:a1:f7 reason=3 locally_generated=1
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant(  648): wlan0: Auto connect enabled: try to reconnect (wps=1 wpa_state=6)
D/wpa_supplicant(  648): wlan0: Setting scan request: 0 sec 500000 usec
D/wpa_supplicant(  648): Added BSSID 98:fc:12:d9:a1:f7 into blacklist
D/wpa_supplicant(  648): wlan0: Blacklist count 1 --> request scan in 100 ms
D/wpa_supplicant(  648): wlan0: Setting scan request: 0 sec 100000 usec
D/wpa_supplicant(  648): TDLS: Remove peers on disassociation
D/wpa_supplicant(  648): wlan0: Disconnect event - remove keys
D/wpa_supplicant(  648): wpa_driver_nl80211_set_key: ifindex=2 (wlan0) alg=0 addr=0x0 key_idx=0 set_tx=0 seq_len=0 key_len=0
D/wpa_supplicant(  648): wpa_driver_nl80211_set_key: ifindex=2 (wlan0) alg=0 addr=0x0 key_idx=1 set_tx=0 seq_len=0 key_len=0
D/wpa_supplicant(  648): wpa_driver_nl80211_set_key: ifindex=2 (wlan0) alg=0 addr=0x0 key_idx=2 set_tx=0 seq_len=0 key_len=0
D/wpa_supplicant(  648): wpa_driver_nl80211_set_key: ifindex=2 (wlan0) alg=0 addr=0x0 key_idx=3 set_tx=0 seq_len=0 key_len=0
D/wpa_supplicant(  648): wpa_driver_nl80211_set_key: ifindex=2 (wlan0) alg=0 addr=0x7691cba4 key_idx=0 set_tx=0 seq_len=0 key_len=0
D/wpa_supplicant(  648): wlan0: State: ASSOCIATED -> DISCONNECTED
D/wpa_supplicant(  648): wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
D/wpa_supplicant(  648): netlink: Operstate: linkmode=-1, operstate=5
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant(  648): EAPOL: External notification - portEnabled=0
D/wpa_supplicant(  648): EAPOL: SUPP_PAE entering state DISCONNECTED
D/wpa_supplicant(  648): EAPOL: Supplicant port status: Unauthorized
D/wpa_supplicant(  648): nl80211: Set supplicant port unauthorized for 00:00:00:00:00:00
D/wpa_supplicant(  648): EAPOL: SUPP_BE entering state INITIALIZE
D/wpa_supplicant(  648): EAP: EAP entering state DISABLED
D/wpa_supplicant(  648): EAPOL: Supplicant port status: Unauthorized
D/wpa_supplicant(  648): nl80211: Set supplicant port unauthorized for 00:00:00:00:00:00
D/wpa_supplicant(  648): EAPOL: External notification - portValid=0
D/wpa_supplicant(  648): EAPOL: Supplicant port status: Unauthorized
D/wpa_supplicant(  648): nl80211: Set supplicant port unauthorized for 00:00:00:00:00:00
D/wpa_supplicant(  648): wlan0: No keys have been configured - skip key clearing
D/wpa_supplicant(  648): wlan0: State: DISCONNECTED -> DISCONNECTED
D/wpa_supplicant(  648): wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
D/wpa_supplicant(  648): netlink: Operstate: linkmode=-1, operstate=5
D/wpa_supplicant(  648): EAPOL: External notification - portEnabled=0
D/wpa_supplicant(  648): EAPOL: Supplicant port status: Unauthorized
D/wpa_supplicant(  648): nl80211: Set supplicant port unauthorized for 00:00:00:00:00:00
D/wpa_supplicant(  648): EAPOL: External notification - portValid=0
D/wpa_supplicant(  648): EAPOL: Supplicant port status: Unauthorized
D/wpa_supplicant(  648): nl80211: Set supplicant port unauthorized for 00:00:00:00:00:00
D/CommandListener(  160): Clearing all IP addresses on wlan0
D/wpa_supplicant(  648): WPS: Checking whether fast association without a new scan can be used
D/wpa_supplicant(  648): wlan0: Selecting BSS from priority group 78

D/wpa_supplicant(  648): wlan0:    selected BSS 98:fc:12:d9:a1:f7 ssid='Nippon1'
D/wpa_supplicant(  648): Fast associate: Old scan results
D/wpa_supplicant(  648): wlan0: Setting scan request: 0 sec 0 usec
D/wpa_supplicant(  648): EAPOL: Supplicant port status: Unauthorized
D/wpa_supplicant(  648): nl80211: Set supplicant port unauthorized for 00:00:00:00:00:00
D/wpa_supplicant(  648): RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
D/wpa_supplicant(  648): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
D/wpa_supplicant(  648): nl80211: if_removed already cleared - ignore event
D/wpa_supplicant(  648): RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
D/wpa_supplicant(  648): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
D/wpa_supplicant(  648): nl80211: if_removed already cleared - ignore event
D/wpa_supplicant(  648): nl80211: Drv Event 48 (NL80211_CMD_DISCONNECT) received for wlan0
D/wpa_supplicant(  648): nl80211: Ignore disconnect event triggered during reassociation
D/wpa_supplicant(  648): wlan0: State: DISCONNECTED -> SCANNING
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant(  648): wlan0: Starting AP scan for wildcard SSID
D/wpa_supplicant(  648): wlan0: WPS: Scan only frequency 2412 MHz th
D/wpa_supplicant(  648): wlan0: nl80211: scan request
D/wpa_supplicant(  648): Scan requested (ret=0) - scan timeout 30 seconds
D/wpa_supplicant(  648): nl80211: Drv Event 33 (NL80211_CMD_TRIGGER_SCAN) received for wlan0
D/wpa_supplicant(  648): wlan0: nl80211: Scan trigger
D/wpa_supplicant(  648): RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
D/wpa_supplicant(  648): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
D/wpa_supplicant(  648): nl80211: if_removed alReceived Sequence number = 477ready cleared - ignore event
D/wpa_supplicant(  648): nl80211: Drv Event 34 (NL80211_CMD_NEW_SCAN_RESULTS) received for wlan0
D/wpa_supplicant(  648): wlan0: nl80211: New scan results available
D/wpa_supplicant(  648): wlan0: Event SCAN_RESULTS (3) received
D/wpa_supplicant(  648): nl80211: Received scan results (8 BSSes)
D/wpa_supplicant(  648): wlan0: BSS: Start scan result update 8
D/wpa_supplicant(  648): BSS: last_scan_res_used=8/32 last_scan_full=0
D/wpa_supplicant(  648): wlan0: New scan results available
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 74783 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant(  648): WPS: AP 98:fc:12:d9:a1:f7 type 0 added
D/wpa_supplicant(  648): wlan0: Selecting BSS from priority group 78

D/wpa_supplicant(  648): wlan0:    selected BSS 98:fc:12:d9:a1:f7 ssid='Nippon1'
D/wpa_supplicant(  648): wlan0: Considering connect request: reassociate: 1  selected: 98:fc:12:d9:a1:f7  bssid: 00:00:00:00:00:00  pending: 00:00:00:00:00:00  wpa_state: SCANNING  ssid=0x76964380  current_ssid=0x0
D/wpa_supplicant(  648): wlan0: Request association with 98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): WPA: Unrecognized EAPOL-Key Key Data IE - hexdump(len=9): 00 07 4e 69 70 70 6f 6e 31
D/wpa_supplicant(  648): WPA: Unrecognized EAPOL-Key Key Data IE - hexdump(len=3): 03 01 01
D/wpa_supplicant(  648): WPA: RSN IE in EAPOL-Key - hexdump(len=
Received Sequence number = 48622): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 01 00
D/wpa_supplicant(  648): WPA: Unrecognized EAPOL-Key Key Data IE - hexdump(len=3): 2a 01 00
D/wpa_supplicant(  648): WPAReceived Sequence number = 6: Unrecognized EAPOL-Key Key Data IE - hexdump(len=24): 3d 16 01 08 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
D/wpa_supplicant(  648): TDLS: TDLS is allowed in the target BSS
I/wpa_supplicant(  648): wlan0: Trying to associate with 98:fc:12:d9:a1:f7 (SSID='Nippon1' freq=2412 MHz)
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant(  648): wlan0: Cancelling scan request
D/wpa_supplicant(  648): wlan0: WPA: clearing owncfg80211: Calling CRDA to update world regulatory domain
 WPA/RSN IE
D/wpa_supplicant(  648): wlan0: Automatic auth_alg selection: 0x1
D/wpa_supplicant(  648): wlan0: Overriding auth_alg selection: 0x1
D/wpa_supplicant(  648): RSN: PMKSA cache search - network_ctx=0x76964380 try_opportunistic=0
D/wpa_supplicant(  648): RSN: Search for BSSID 98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): RSN: No PMKSA cache entry found
D/wpa_supplicant(  648): wlan0: RSN: using IEEE 802.11i/D9.0
D/wpa_supplicant(  648): wlan0: WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 2
D/wpa_supplicant(  648): wlan0: WPA: clearing AP WPA IE
D/wpa_supplicant(  648): WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 01 00
D/wpa_supplicant(  648): wlan0: WPA: using GTK CCMP
D/wpa_supplicant(  648): wlan0: WPA: using PTK CCMP
D/wpa_supplicant(  648): wlan0: WPA: using KEY_MGMT WPA-PSK
D/wpa_supplicant(  648): WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
D/wpa_supplicant(  648): wlan0: No keys have been configured - skip key clearing
D/wpa_supplicant(  648): wlan0: State: SCANNING -> ASSOCIATING
D/wpa_supplicant(  648): wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
D/wpa_supplicant(  648): netlink: Operstate: linkmode=-1, operstate=5
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant(  648): Limit connection to BSSID 98:fc:12:d9:a1:f7 freq=2412 MHz based on scan results (bssid_set=0)
D/wpa_supplicant(  648): nl80211: Unsubscribe mgmt frames handle 0x7694f100 (mode change)
D/wpa_supplicant(  648): nl80211: Subscribe to mgmt frames with non-AP handle 0x7694f100
D/wpa_supplicant(  648): nl80211: Register frame type=0xd0 nl_handle=0x7694f100
D/wpa_supplicant(  648): nl80211: Register frame match - hexdump(len=1): 06
D/wpa_supplicant(  648): nl80211: Register frame type=0xd0 nl_handle=0x7694f100
D/wpa_supplicant(  648): nl80211: Register frame match - hexdump(len=2): 0a 07
D/wpa_supplicant(  648): nl80211: Register frame type=0xd0 nl_handle=0x7694f100
D/wpa_supplicant(  648): nl80211: Register frame match - hexdump(len=2): 0a 11
D/wpa_supplicant(  648): nl80211: Connect (ifindex=2)
D/wpa_supplicant(  648):   * bssid=98:fc:12:d9:a1:f7
D/wpa_supplicant(  648):   * freq=2412
D/wpa_supplicant(  648):   * SSID - hexdump(len=7): 4e 69 70 70 6f 6e 31
D/wpa_supplicant(  648):   * IEs - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
D/wpa_supplicant(  648):   * Auth Type 0
D/wpa_supplicant(  648):   * WPA Versions 0x2
D/wpa_supplicant(  648): nl80211: Connect request send successfully
D/wpa_supplicant(  648): wlan0: Setting authentication timeout: 10 sec 0 usec
D/wpa_supplicant(  648): EAPOL: External notification - EAP success=0
D/wpa_supplicant(  648): EAPOL: Supplicant port status: Unauthorized
D/wpa_supplicant(  648): nl80211: Set supplicant port unauthorized for 00:00:00:00:00:00
D/wpa_supplicant(  648): EAPOL: External notification - EAP fail=0
D/wpa_supplicant(  648): EAPOL: Supplicant port status: Unauthorized
D/wpa_supplicant(  648): nl80211: Set supplicant port unauthorized for 00:00:00:00:00:00
E/WifiStateMachine(  438): processMsg: SupplicantStartedState
D/wpa_supplicant(  648): EAPOL: External notification - portControl=Auto
D/wpa_supplicant(  648): EAPOL: Supplicant port status: Unauthorized
D/wpa_supplicant(  648): nl80211: Set supplicant port unauthorized for 00:00:00:00:00:00
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: BSS RANGE=0- MASK=0x21987
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=25): 42 53 53 20 52 41 4e 47 45 3d 30 2d 20 4d 41 53 4b 3d 30 78 32 31 39 38 37
D/wpa_supplicant(  648): wlan0: Control interface command 'BSS RANGE=0- MASK=0x21987'
D/wpa_supplicant(  648): nl80211: Drv Event 46 (NL80211_CMD_CONNECT) received for wlan0
D/wpa_supplicant(  648): nl80211: Connect event
D/wpa_supplicant(  648): nl80211: Associated on 2412 MHz
D/wpa_supplicant(  648): nl80211: Associated with 98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): nl80211: Operating frequency for the associated BSS from scan results: 2412 MHz
D/wpa_supplicant(  648): wlan0: Event ASSOC (0) received
D/wpa_supplicant(  648): wlan0: Association info event
D/wpa_supplicant(  648): req_ies - hexdump(len=86): 03 00 00 07 4e 69 70 70 6f 6e 31 01 08 82 84 8b 96 0c 12 18 24 32 04 30 48 60 6c 30 14 01 00 00 ...
D/wpa_supplicant(  648): resp_ies - hexdump(len=117): 01 08 82 84 8b 0c 12 96 18 24 32 04 30 48 60 6c dd 18 00 50 f2 02 01 01 02 00 03 a4 00 00 27 a4 ...
D/wpa_supplicant(  648): WPA: Unrecognized EAPOL-Key Key Data IE - hexdump(len=24): 3d 16 01 08 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
D/wpa_supplicant(  648): wlan0: freq=2412 MHz
D/wpa_supplicant(  648): WPA: set own WPA/RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
D/wpa_supplicant(  648): wlan0: State: ASSOCIATING -> ASSOCIATED
D/wpa_supplicant(  648): wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)
D/wpa_supplicant(  648): netlink: Operstate: linkmode=-1, operstate=5
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant(  648): wlan0: Associated to a new BSS: BSSID=98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): wlan0: No keys have been configured - skip key clearing
D/wpa_supplicant(  648): wlan0: WPA: clearing AP WPA IE
D/wpa_supplicant(  648): WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 01 00
I/wpa_supplicant(  648): wlan0: Associated with 98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant(  648): wlan0: WPA: Association event - clear replay counter
D/wpa_supplicant(  648): wlan0: WPA: Clear old PTK
D/wpa_supplicant(  648): TDLS: Remove peers on association
D/wpa_supplicant(  648): EAPOL: External notification - portEnabled=0
D/wpa_supplicant(  648): EAPOL: Supplicant port status: Unauthorized
D/wpa_supplicant(  648): nl80211: Set supplicant port unauthorized for 98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): EAPOL: External notification - portValid=0
D/wpa_supplicant(  648): EAPOL: Supplicant port status: Unauthorized
D/wpa_supplicant(  648): nl80211: Set supplicant port unauthorized for 98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): EAPOL: External notification - EAP success=0
D/wpa_supplicant(  648): EAPOL: Supplicant port status: Unauthorized
D/wpa_supplicant(  648): nl80211: Set supplicant port unauthorized for 98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): EAPOL: External notification - portEnabled=1
D/wpa_supplicant(  648): EAPOL: SUPP_PAE entering state CONNECTING
D/wpa_supplicant(  648): EAPOL: SUPP_BE entering state IDLE
D/wpa_supplicant(  648): wlan0: Setting authentication timeout: 10 sec 0 usec
D/wpa_supplicant(  648): wlan0: Cancelling scan request
D/wpa_supplicant(  648): RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
D/wpa_supplicant(  648): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
D/wpa_supplicant(  648): nl80211: if_removed already cleared - ignore event
D/wpa_supplicant(  648): RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
D/wpa_supplicant(  648): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
D/wpa_supplicant(  648): nl80211: if_removed already cleared - ignore event
D/wpa_supplicant(  648): RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
D/wpa_supplicant(  648): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
D/wpa_supplicant(  648): nl80211: if_removed already cleared - ignore event
D/wpa_supplicant(  648): RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
D/wpa_supplicant(  648): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
D/wpa_supplicant(  648): nl80211: if_removed already cleared - ignore event
D/wpa_supplicant(  648): wlan0: RX EAPOL from 98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): wlan0: Setting authentication timeout: 10 sec 0 usec
D/wpa_supplicant(  648): wlan0: IEEE 802.1X RX: version=1 type=3 length=117
D/wpa_supplicant(  648): wlan0:   EAPOL-Key type=2
D/wpa_supplicant(  648): wlan0:   key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
D/wpa_supplicant(  648): wlan0:   key_length=16 key_data_length=22
D/wpa_supplicant(  648):   replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 08
D/wpa_supplicant(  648):   key_nonce - hexdump(len=32): 53 66 00 c0 b3 16 d4 f6 84 63 cf c2 a6 b7 6e 77 b0 92 fe 06 f4 25 85 62 48 05 6a 82 a2 53 f7 a9
D/wpa_supplicant(  648):   key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
D/wpa_supplicant(  648):   key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
D/wpa_supplicant(  648):   key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
D/wpa_supplicant(  648):   key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
D/wpa_supplicant(  648): wlan0: State: ASSOCIATED -> 4WAY_HANDSHAKE
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant(  648): wlan0: WPA: RX message 1 of 4-Way Handshake from 98:fc:12:d9:a1:f7 (ver=2)
D/wpa_supplicant(  648): RSN: msg 1/4 key data - hexdump(len=22): dd 14 00 0f ac 04 d9 06 1a 62 dc c7 f3 74 91 0d 46 29 25 45 fb a1
D/wpa_supplicant(  648): WPA: PMKID in EAPOL-Key - hexdump(len=22): dd 14 00 0f ac 04 d9 06 1a 62 dc c7 f3 74 91 0d 46 29 25 45 fb a1
D/wpa_supplicant(  648): RSN: PMKID from Authenticator - hexdump(len=16): d9 06 1a 62 dc c7 f3 74 91 0d 46 29 25 45 fb a1
D/wpa_supplicant(  648): wlan0: RSN: no matching PMKID found
D/wpa_supplicant(  648): WPA: Renewed SNonce - hexdump(len=32): 9c 78 2b 71 29 2f 00 e8 a3 f3 7e 24 31 69 bb 54 96 0f b8 d2 96 a9 37 a0 ea d3 54 7d 1f 93 64 86
D/wpa_supplicant(  648): WPA: PTK derivation - A1=01:01:77:40:1a:9d A2=98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): WPA: Nonce1 - hexdump(len=32): 9c 78 2b 71 29 2f 00 e8 a3 f3 7e 24 31 69 bb 54 96 0f b8 d2 96 a9 37 a0 ea d3 54 7d 1f 93 64 86
D/wpa_supplicant(  648): WPA: Nonce2 - hexdump(len=32): 53 66 00 c0 b3 16 d4 f6 84 63 cf c2 a6 b7 6e 77 b0 92 fe 06 f4 25 85 62 48 05 6a 82 a2 53 f7 a9
D/wpa_supplicant(  648): WPA: PMK - hexdump(len=32): [REMOVED]
D/wpa_supplicant(  648): WPA: PTK - hexdump(len=48): [REMOVED]
D/wpa_supplicant(  648): WPA: WPA IE for msg 2/4 - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
D/wpa_supplicant(  648): WPA: Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 08
D/wpa_supplicant(  648): wlan0: WPA: Sending EAPOL-Key 2/4
D/wpa_supplicant(  648): WPA: KCK - hexdump(len=16): [REMOVED]
D/wpa_supplicant(  648): WPA: Derived Key MIC - hexdump(len=16): 04 39 7e e3 48 e2 3b ba 7e 4e e1 8b 42 1d 4a 72
D/wpa_supplicant(  648): wlan0: RX EAPOL from 98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): wlan0: IEEE 802.1X RX: version=1 type=3 length=151
D/wpa_supplicant(  648): wlan0:   EAPOL-Key type=2
D/wpa_supplicant(  648): wlan0:   key_info 0x13ca (ver=2 keyidx=0 rsvd=0 Pairwise Install Ack MIC Secure Encr)
D/wpa_supplicant(  648): wlan0:   key_length=16 key_data_length=56
D/wpa_supplicant(  648):   replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 09
D/wpa_supplicant(  648):   key_nonce - hexdump(len=32): 53 66 00 c0 b3 16 d4 f6 84 63 cf c2 a6 b7 6e 77 b0 92 fe 06 f4 25 85 62 48 05 6a 82 a2 53 f7 a9
D/wpa_supplicant(  648):   key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
D/wpa_supplicant(  648):   key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
D/wpa_supplicant(  648):   key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
D/wpa_supplicant(  648):   key_mic - hexdump(len=16): 4f 2d 77 cf e5 08 1d 67 9c 87 e6 ad 61 e1 fa 16
D/wpa_supplicant(  648): RSN: encrypted key data - hexdump(len=56): bc b0 17 fc f2 30 8a 10 5d 78 95 d6 03 ed cf 32 e2 8c 80 a4 a5 ec cb 28 ca f7 fa db 6e 82 d1 a1 ...
D/wpa_supplicant(  648): WPA: decrypted EAPOL-Key key data - hexdump(len=48): [REMOVED]
D/wpa_supplicant(  648): wlan0: State: 4WAY_HANDSHAKE -> 4WAY_HANDSHAKE
D/wpa_supplicant(  648): wlan0: WPA: RX message 3 of 4-Way Handshake from 98:fc:12:d9:a1:f7 (ver=2)
D/wpa_supplicant(  648): WPA: IE KeyData - hexdump(len=48): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 01 00 dd 16 00 0f ac 01 03 00 a0 c4 ...
D/wpa_supplicant(  648): WPA: RSN IE in EAPOL-Key - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 01 00
D/wpa_supplicant(  648): WPA: GTK in EAPOL-Key - hexdump(len=24): [REMOVED]
D/wpa_supplicant(  648): wlan0: WPA: Sending EAPOL-Key 4/4
D/wpa_supplicant(  648): WPA: KCK - hexdump(len=16): [REMOVED]
D/wpa_supplicant(  648): WPA: Derived Key MIC - hexdump(len=16): ca 92 14 c5 9b 64 80 45 29 b8 84 ff 69 2b 6c 61
D/wpa_supplicant(  648): wlan0: WPA: Installing PTK to the driver
D/wpa_supplicant(  648): wpa_driver_nl80211_set_key: ifindex=2 (wlan0) alg=3 addr=0x7695a58c key_idx=0 set_tx=1 seq_len=6 key_len=16
D/wpa_supplicant(  648):    addr=98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): EAPOL: External notification - portValid=1
D/wpa_supplicant(  648): wlan0: State: 4WAY_HANDSHAKE -> GROUP_HANDSHAKE
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant(  648): RSN: received GTK in pairwise handshake - hexdump(len=18): [REMOVED]
D/wpa_supplicant(  648): WPA: Group Key - hexdump(len=16): [REMOVED]
D/wpa_supplicant(  648): wlan0: WPA: Installing GTK to the driver (keyidx=3 tx=0 len=16)
D/wpa_supplicant(  648): WPA: RSC - hexdump(len=6): 00 00 00 00 00 00
D/wpa_supplicant(  648): wpa_driver_nl80211_set_key: ifindex=2 (wlan0) alg=3 addr=0x76edd68e key_idx=3 set_tx=0 seq_len=6 key_len=16
I/wpa_supplicant(  648): wlan0: WPA: Key negotiation completed with 98:fc:12:d9:a1:f7 [PTK=CCMP GTK=CCMP]
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant(  648): wlan0: Cancelling authentication timeout
D/wpa_supplicant(  648): wlan0: State: GROUP_HANDSHAKE -> COMPLETED
I/wpa_supplicant(  648): wlan0: CTRL-EVENT-CONNECTED - Connection to 98:fc:12:d9:a1:f7 completed (auth) [id=9 id_str=]
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant(  648): wpa_driver_nl80211_set_operstate: operstate 0->1 (UP)
D/wpa_supplicant(  648): netlink: Operstate: linkmode=-1, operstate=6
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant(  648): EAPOL: External notification - portValid=1
D/wpa_supplicant(  648): EAPOL: External notification - EAP success=1
D/wpa_supplicant(  648): EAPOL: SUPP_PAE entering state AUTHENTICATING
D/wpa_supplicant(  648): EAPOL: SUPP_BE entering state SUCCESS
D/wpa_supplicant(  648): EAP: EAP entering state DISABLED
D/wpa_supplicant(  648): EAPOL: SUPP_PAE entering state AUTHENTICATED
D/wpa_supplicant(  648): EAPOL: Supplicant port status: Authorized
D/wpa_supplicant(  648): nl80211: Set supplicant port authorized for 98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): EAPOL: SUPP_BE entering state IDLE
D/wpa_supplicant(  648): EAPOL authentication completed successfully
D/wpa_supplicant(  648): RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
D/wpa_supplicant(  648): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
D/wpa_supplicant(  648): nl80211: if_removed already cleared - ignore event
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: ENABLE_NETWORK 3
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=16): 45 4e 41 42 4c 45 5f 4e 45 54 57 4f 52 4b 20 33
D/wpa_supplicant(  648): wlan0: Control interface command 'ENABLE_NETWORK 3'
D/wpa_supplicant(  648): CTRL_IFACE: ENABLE_NETWORK id=3
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: SAVE_CONFIG
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=11): 53 41 56 45 5f 43 4f 4e 46 49 47
D/wpa_supplicant(  648): wlan0: Control interface command 'SAVE_CONFIG'
D/wpa_supplicant(  648): Writing configuration file '/data/misc/wifi/wpa_supplicant.conf'
D/wpa_supplicant(  648): Configuration file '/data/misc/wifi/wpa_supplicant.conf' written successfully
D/wpa_supplicant(  648): CTRL_IFACE: SAVE_CONFIG - Configuration updated
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: LIST_NETWORKS
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=13): 4c 49 53 54 5f 4e 45 54 57 4f 52 4b 53
D/wpa_supplicant(  648): wlan0: Control interface command 'LIST_NETWORKS'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 ssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=18): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 ssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='ssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 bssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 62 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 bssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='bssid'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'bssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 priority
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 70 72 69 6f 72 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 priority'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='priority'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 scan_ssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=23): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 73 63 61 6e 5f 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 scan_ssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='scan_ssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 wep_tx_keyidx
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=27): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 77 65 70 5f 74 78 5f 6b 65 79 69 64 78
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 wep_tx_keyidx'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='wep_tx_keyidx'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 wep_key0
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 77 65 70 5f 6b 65 79 30
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 wep_key0'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='wep_key0'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key0'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 wep_key1
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 77 65 70 5f 6b 65 79 31
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 wep_key1'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='wep_key1'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key1'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 wep_key2
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 77 65 70 5f 6b 65 79 32
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 wep_key2'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='wep_key2'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key2'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 wep_key3
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 77 65 70 5f 6b 65 79 33
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 wep_key3'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='wep_key3'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key3'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 psk
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=17): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 70 73 6b
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 psk'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='psk'
D/wpa_supplicant(  648): Do not allow key_data field to be exposed
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 proto
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 70 72 6f 74 6f
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 proto'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='proto'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 key_mgmt
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 6b 65 79 5f 6d 67 6d 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 key_mgmt'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='key_mgmt'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 auth_alg
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 61 75 74 68 5f 61 6c 67
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 auth_alg'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='auth_alg'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 pairwise
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 70 61 69 72 77 69 73 65
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 pairwise'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='pairwise'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 group
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 67 72 6f 75 70
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 group'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='group'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 eap
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=17): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 65 61 70
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 eap'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='eap'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'eap'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 phase2
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 70 68 61 73 65 32
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 phase2'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='phase2'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'phase2'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 identity
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 69 64 65 6e 74 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 identity'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='identity'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'identity'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 anonymous_identity
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=32): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 61 6e 6f 6e 79 6d 6f 75 73 5f 69 64 65 6e 74 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 anonymous_identity'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='anonymous_identity'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'anonymous_identity'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 password
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 70 61 73 73 77 6f 72 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 password'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='password'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'password'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 client_cert
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=25): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 63 6c 69 65 6e 74 5f 63 65 72 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 client_cert'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='client_cert'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'client_cert'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 ca_cert
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=21): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 63 61 5f 63 65 72 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 ca_cert'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='ca_cert'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'ca_cert'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 subject_match
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=27): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 73 75 62 6a 65 63 74 5f 6d 61 74 63 68
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 subject_match'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='subject_match'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'subject_match'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 engine
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 65 6e 67 69 6e 65
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 engine'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='engine'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 engine_id
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=23): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 65 6e 67 69 6e 65 5f 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 engine_id'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='engine_id'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'engine_id'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 key_id
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 6b 65 79 5f 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 key_id'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='key_id'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'key_id'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 0 private_key
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=25): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 30 20 70 72 69 76 61 74 65 5f 6b 65 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 0 private_key'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=0 name='private_key'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'private_key'
E/BufferQueueProducer(  158): [com.android.settings/com.android.settings.SubSettings] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 ssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=18): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 ssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='ssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 bssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 62 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 bssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='bssid'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'bssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 priority
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 70 72 69 6f 72 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 priority'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='priority'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 scan_ssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=23): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 73 63 61 6e 5f 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 scan_ssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='scan_ssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 wep_tx_keyidx
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=27): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 77 65 70 5f 74 78 5f 6b 65 79 69 64 78
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 wep_tx_keyidx'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='wep_tx_keyidx'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 wep_key0
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 77 65 70 5f 6b 65 79 30
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 wep_key0'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='wep_key0'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key0'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 wep_key1
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 77 65 70 5f 6b 65 79 31
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 wep_key1'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='wep_key1'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key1'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 wep_key2
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 77 65 70 5f 6b 65 79 32
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 wep_key2'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='wep_key2'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key2'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 wep_key3
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 77 65 70 5f 6b 65 79 33
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 wep_key3'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='wep_key3'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key3'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 psk
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=17): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 70 73 6b
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 psk'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='psk'
D/wpa_supplicant(  648): Do not allow key_data field to be exposed
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 proto
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 70 72 6f 74 6f
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 proto'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='proto'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 key_mgmt
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 6b 65 79 5f 6d 67 6d 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 key_mgmt'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='key_mgmt'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 auth_alg
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 61 75 74 68 5f 61 6c 67
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 auth_alg'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='auth_alg'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 pairwise
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 70 61 69 72 77 69 73 65
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 pairwise'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='pairwise'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 group
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 67 72 6f 75 70
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 group'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='group'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 eap
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=17): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 65 61 70
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 eap'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='eap'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'eap'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 phase2
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 70 68 61 73 65 32
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 phase2'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='phase2'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'phase2'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 identity
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 69 64 65 6e 74 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 identity'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='identity'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'identity'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 anonymous_identity
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=32): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 61 6e 6f 6e 79 6d 6f 75 73 5f 69 64 65 6e 74 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 anonymous_identity'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='anonymous_identity'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'anonymous_identity'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 password
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 70 61 73 73 77 6f 72 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 password'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='password'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'password'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 client_cert
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=25): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 63 6c 69 65 6e 74 5f 63 65 72 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 client_cert'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='client_cert'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'client_cert'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 ca_cert
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=21): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 63 61 5f 63 65 72 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 ca_cert'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='ca_cert'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'ca_cert'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 subject_match
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=27): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 73 75 62 6a 65 63 74 5f 6d 61 74 63 68
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 subject_match'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='subject_match'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'subject_match'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 engine
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 65 6e 67 69 6e 65
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 engine'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='engine'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 engine_id
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=23): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 65 6e 67 69 6e 65 5f 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 engine_id'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='engine_id'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'engine_id'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 key_id
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 6b 65 79 5f 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 key_id'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='key_id'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'key_id'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 1 private_key
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=25): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 31 20 70 72 69 76 61 74 65 5f 6b 65 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 1 private_key'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=1 name='private_key'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'private_key'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 ssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=18): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 ssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='ssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 bssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 62 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 bssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='bssid'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'bssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 priority
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 70 72 69 6f 72 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 priority'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='priority'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 scan_ssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=23): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 73 63 61 6e 5f 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 scan_ssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='scan_ssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 wep_tx_keyidx
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=27): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 77 65 70 5f 74 78 5f 6b 65 79 69 64 78
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 wep_tx_keyidx'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='wep_tx_keyidx'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 wep_key0
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 77 65 70 5f 6b 65 79 30
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 wep_key0'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='wep_key0'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key0'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 wep_key1
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 77 65 70 5f 6b 65 79 31
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 wep_key1'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='wep_key1'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key1'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 wep_key2
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 77 65 70 5f 6b 65 79 32
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 wep_key2'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='wep_key2'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key2'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 wep_key3
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 77 65 70 5f 6b 65 79 33
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 wep_key3'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='wep_key3'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key3'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 psk
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=17): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 70 73 6b
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 psk'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='psk'
D/wpa_supplicant(  648): Do not allow key_data field to be exposed
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 proto
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 70 72 6f 74 6f
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 proto'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='proto'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 key_mgmt
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 6b 65 79 5f 6d 67 6d 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 key_mgmt'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='key_mgmt'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 auth_alg
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 61 75 74 68 5f 61 6c 67
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 auth_alg'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='auth_alg'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 pairwise
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 70 61 69 72 77 69 73 65
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 pairwise'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='pairwise'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 group
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 67 72 6f 75 70
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 group'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='group'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 eap
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=17): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 65 61 70
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 eap'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='eap'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'eap'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 phase2
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 70 68 61 73 65 32
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 phase2'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='phase2'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'phase2'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 identity
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 69 64 65 6e 74 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 identity'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='identity'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'identity'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 anonymous_identity
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=32): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 61 6e 6f 6e 79 6d 6f 75 73 5f 69 64 65 6e 74 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 anonymous_identity'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='anonymous_identity'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'anonymous_identity'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 password
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 70 61 73 73 77 6f 72 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 password'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='password'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'password'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 client_cert
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=25): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 63 6c 69 65 6e 74 5f 63 65 72 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 client_cert'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='client_cert'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'client_cert'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 ca_cert
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=21): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 63 61 5f 63 65 72 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 ca_cert'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='ca_cert'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'ca_cert'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 subject_match
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=27): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 73 75 62 6a 65 63 74 5f 6d 61 74 63 68
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 subject_match'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='subject_match'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'subject_match'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 engine
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 65 6e 67 69 6e 65
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 engine'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='engine'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 engine_id
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=23): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 65 6e 67 69 6e 65 5f 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 engine_id'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='engine_id'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'engine_id'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 key_id
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 6b 65 79 5f 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 key_id'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='key_id'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'key_id'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 2 private_key
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=25): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 32 20 70 72 69 76 61 74 65 5f 6b 65 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 2 private_key'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=2 name='private_key'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'private_key'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 ssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=18): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 ssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='ssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 bssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 62 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 bssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='bssid'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'bssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 priority
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 70 72 69 6f 72 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 priority'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='priority'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 scan_ssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=23): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 73 63 61 6e 5f 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 scan_ssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='scan_ssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 wep_tx_keyidx
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=27): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 77 65 70 5f 74 78 5f 6b 65 79 69 64 78
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 wep_tx_keyidx'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='wep_tx_keyidx'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 wep_key0
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 77 65 70 5f 6b 65 79 30
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 wep_key0'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='wep_key0'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key0'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 wep_key1
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 77 65 70 5f 6b 65 79 31
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 wep_key1'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='wep_key1'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key1'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 wep_key2
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 77 65 70 5f 6b 65 79 32
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 wep_key2'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='wep_key2'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key2'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 wep_key3
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 77 65 70 5f 6b 65 79 33
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 wep_key3'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='wep_key3'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key3'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 psk
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=17): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 70 73 6b
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 psk'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='psk'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'psk'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 proto
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 70 72 6f 74 6f
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 proto'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='proto'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 key_mgmt
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 6b 65 79 5f 6d 67 6d 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 key_mgmt'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='key_mgmt'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 auth_alg
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 61 75 74 68 5f 61 6c 67
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 auth_alg'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='auth_alg'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 pairwise
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 70 61 69 72 77 69 73 65
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 pairwise'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='pairwise'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 group
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 67 72 6f 75 70
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 group'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='group'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 eap
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=17): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 65 61 70
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 eap'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='eap'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'eap'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 phase2
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 70 68 61 73 65 32
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 phase2'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='phase2'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'phase2'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 identity
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 69 64 65 6e 74 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 identity'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='identity'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'identity'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 anonymous_identity
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=32): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 61 6e 6f 6e 79 6d 6f 75 73 5f 69 64 65 6e 74 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 anonymous_identity'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='anonymous_identity'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'anonymous_identity'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 password
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 70 61 73 73 77 6f 72 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 password'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='password'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'password'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 client_cert
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=25): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 63 6c 69 65 6e 74 5f 63 65 72 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 client_cert'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='client_cert'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'client_cert'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 ca_cert
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=21): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 63 61 5f 63 65 72 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 ca_cert'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='ca_cert'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'ca_cert'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 subject_match
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=27): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 73 75 62 6a 65 63 74 5f 6d 61 74 63 68
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 subject_match'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='subject_match'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'subject_match'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 engine
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 65 6e 67 69 6e 65
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 engine'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='engine'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 engine_id
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=23): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 65 6e 67 69 6e 65 5f 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 engine_id'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='engine_id'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'engine_id'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 key_id
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 6b 65 79 5f 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 key_id'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='key_id'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'key_id'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 3 private_key
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=25): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 33 20 70 72 69 76 61 74 65 5f 6b 65 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 3 private_key'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=3 name='private_key'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'private_key'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 ssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=18): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 ssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='ssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 bssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 62 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 bssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='bssid'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'bssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 priority
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 70 72 69 6f 72 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 priority'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='priority'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 scan_ssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=23): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 73 63 61 6e 5f 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 scan_ssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='scan_ssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 wep_tx_keyidx
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=27): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 77 65 70 5f 74 78 5f 6b 65 79 69 64 78
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 wep_tx_keyidx'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='wep_tx_keyidx'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 wep_key0
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 77 65 70 5f 6b 65 79 30
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 wep_key0'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='wep_key0'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key0'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 wep_key1
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 77 65 70 5f 6b 65 79 31
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 wep_key1'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='wep_key1'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key1'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 wep_key2
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 77 65 70 5f 6b 65 79 32
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 wep_key2'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='wep_key2'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key2'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 wep_key3
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 77 65 70 5f 6b 65 79 33
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 wep_key3'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='wep_key3'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key3'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 psk
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=17): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 70 73 6b
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 psk'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='psk'
D/wpa_supplicant(  648): Do not allow key_data field to be exposed
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 proto
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 70 72 6f 74 6f
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 proto'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='proto'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 key_mgmt
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 6b 65 79 5f 6d 67 6d 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 key_mgmt'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='key_mgmt'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 auth_alg
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 61 75 74 68 5f 61 6c 67
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 auth_alg'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='auth_alg'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 pairwise
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 70 61 69 72 77 69 73 65
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 pairwise'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='pairwise'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 group
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 67 72 6f 75 70
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 group'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='group'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 eap
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=17): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 65 61 70
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 eap'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='eap'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'eap'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 phase2
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 70 68 61 73 65 32
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 phase2'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='phase2'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'phase2'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 identity
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 69 64 65 6e 74 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 identity'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='identity'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'identity'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 anonymous_identity
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=32): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 61 6e 6f 6e 79 6d 6f 75 73 5f 69 64 65 6e 74 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 anonymous_identity'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='anonymous_identity'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'anonymous_identity'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 password
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 70 61 73 73 77 6f 72 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 password'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='password'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'password'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 client_cert
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=25): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 63 6c 69 65 6e 74 5f 63 65 72 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 client_cert'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='client_cert'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'client_cert'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 ca_cert
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=21): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 63 61 5f 63 65 72 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 ca_cert'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='ca_cert'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'ca_cert'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 subject_match
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=27): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 73 75 62 6a 65 63 74 5f 6d 61 74 63 68
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 subject_match'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='subject_match'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'subject_match'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 engine
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 65 6e 67 69 6e 65
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 engine'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='engine'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 engine_id
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=23): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 65 6e 67 69 6e 65 5f 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 engine_id'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='engine_id'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'engine_id'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 key_id
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 6b 65 79 5f 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 key_id'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='key_id'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'key_id'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 4 private_key
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=25): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 34 20 70 72 69 76 61 74 65 5f 6b 65 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 4 private_key'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=4 name='private_key'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'private_key'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 ssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=18): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 ssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='ssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 bssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 62 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 bssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='bssid'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'bssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 priority
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 70 72 69 6f 72 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 priority'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='priority'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 scan_ssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=23): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 73 63 61 6e 5f 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 scan_ssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='scan_ssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 wep_tx_keyidx
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=27): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 77 65 70 5f 74 78 5f 6b 65 79 69 64 78
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 wep_tx_keyidx'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='wep_tx_keyidx'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 wep_key0
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 77 65 70 5f 6b 65 79 30
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 wep_key0'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='wep_key0'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key0'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 wep_key1
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 77 65 70 5f 6b 65 79 31
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 wep_key1'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='wep_key1'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key1'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 wep_key2
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 77 65 70 5f 6b 65 79 32
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 wep_key2'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='wep_key2'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key2'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 wep_key3
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 77 65 70 5f 6b 65 79 33
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 wep_key3'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='wep_key3'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key3'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 psk
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=17): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 70 73 6b
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 psk'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='psk'
D/wpa_supplicant(  648): Do not allow key_data field to be exposed
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 proto
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 70 72 6f 74 6f
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 proto'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='proto'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 key_mgmt
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 6b 65 79 5f 6d 67 6d 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 key_mgmt'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='key_mgmt'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 auth_alg
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 61 75 74 68 5f 61 6c 67
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 auth_alg'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='auth_alg'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 pairwise
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 70 61 69 72 77 69 73 65
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 pairwise'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='pairwise'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 group
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 67 72 6f 75 70
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 group'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='group'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 eap
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=17): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 65 61 70
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 eap'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='eap'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'eap'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 phase2
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 70 68 61 73 65 32
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 phase2'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='phase2'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'phase2'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 identity
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 69 64 65 6e 74 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 identity'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='identity'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'identity'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 anonymous_identity
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=32): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 61 6e 6f 6e 79 6d 6f 75 73 5f 69 64 65 6e 74 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 anonymous_identity'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='anonymous_identity'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'anonymous_identity'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 password
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 70 61 73 73 77 6f 72 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 password'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='password'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'password'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 client_cert
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=25): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 63 6c 69 65 6e 74 5f 63 65 72 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 client_cert'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='client_cert'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'client_cert'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 ca_cert
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=21): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 63 61 5f 63 65 72 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 ca_cert'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='ca_cert'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'ca_cert'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 subject_match
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=27): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 73 75 62 6a 65 63 74 5f 6d 61 74 63 68
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 subject_match'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='subject_match'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'subject_match'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 engine
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 65 6e 67 69 6e 65
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 engine'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='engine'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 engine_id
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=23): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 65 6e 67 69 6e 65 5f 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 engine_id'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='engine_id'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'engine_id'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 key_id
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 6b 65 79 5f 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 key_id'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='key_id'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'key_id'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 5 private_key
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=25): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 35 20 70 72 69 76 61 74 65 5f 6b 65 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 5 private_key'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=5 name='private_key'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'private_key'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 ssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=18): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 ssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='ssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 bssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 62 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 bssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='bssid'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'bssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 priority
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 70 72 69 6f 72 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 priority'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='priority'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 scan_ssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=23): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 73 63 61 6e 5f 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 scan_ssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='scan_ssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 wep_tx_keyidx
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=27): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 77 65 70 5f 74 78 5f 6b 65 79 69 64 78
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 wep_tx_keyidx'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='wep_tx_keyidx'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 wep_key0
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 77 65 70 5f 6b 65 79 30
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 wep_key0'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='wep_key0'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key0'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 wep_key1
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 77 65 70 5f 6b 65 79 31
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 wep_key1'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='wep_key1'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key1'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 wep_key2
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 77 65 70 5f 6b 65 79 32
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 wep_key2'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='wep_key2'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key2'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 wep_key3
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 77 65 70 5f 6b 65 79 33
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 wep_key3'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='wep_key3'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key3'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 psk
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=17): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 70 73 6b
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 psk'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='psk'
D/wpa_supplicant(  648): Do not allow key_data field to be exposed
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 proto
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 70 72 6f 74 6f
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 proto'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='proto'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 key_mgmt
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 6b 65 79 5f 6d 67 6d 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 key_mgmt'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='key_mgmt'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 auth_alg
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 61 75 74 68 5f 61 6c 67
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 auth_alg'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='auth_alg'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 pairwise
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 70 61 69 72 77 69 73 65
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 pairwise'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='pairwise'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 group
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 67 72 6f 75 70
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 group'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='group'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 eap
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=17): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 65 61 70
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 eap'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='eap'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'eap'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 phase2
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 70 68 61 73 65 32
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 phase2'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='phase2'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'phase2'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 identity
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 69 64 65 6e 74 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 identity'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='identity'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'identity'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 anonymous_identity
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=32): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 61 6e 6f 6e 79 6d 6f 75 73 5f 69 64 65 6e 74 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 anonymous_identity'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='anonymous_identity'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'anonymous_identity'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 password
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 70 61 73 73 77 6f 72 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 password'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='password'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'password'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 client_cert
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=25): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 63 6c 69 65 6e 74 5f 63 65 72 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 client_cert'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='client_cert'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'client_cert'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 ca_cert
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=21): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 63 61 5f 63 65 72 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 ca_cert'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='ca_cert'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'ca_cert'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 subject_match
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=27): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 73 75 62 6a 65 63 74 5f 6d 61 74 63 68
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 subject_match'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='subject_match'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'subject_match'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 engine
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 65 6e 67 69 6e 65
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 engine'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='engine'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 engine_id
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=23): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 65 6e 67 69 6e 65 5f 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 engine_id'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='engine_id'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'engine_id'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 key_id
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 6b 65 79 5f 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 key_id'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='key_id'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'key_id'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 6 private_key
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=25): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 36 20 70 72 69 76 61 74 65 5f 6b 65 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 6 private_key'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=6 name='private_key'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'private_key'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 ssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=18): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 ssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='ssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 bssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 62 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 bssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='bssid'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'bssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 priority
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 70 72 69 6f 72 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 priority'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='priority'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 scan_ssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=23): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 73 63 61 6e 5f 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 scan_ssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='scan_ssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 wep_tx_keyidx
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=27): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 77 65 70 5f 74 78 5f 6b 65 79 69 64 78
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 wep_tx_keyidx'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='wep_tx_keyidx'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 wep_key0
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 77 65 70 5f 6b 65 79 30
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 wep_key0'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='wep_key0'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key0'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 wep_key1
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 77 65 70 5f 6b 65 79 31
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 wep_key1'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='wep_key1'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key1'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 wep_key2
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 77 65 70 5f 6b 65 79 32
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 wep_key2'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='wep_key2'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key2'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 wep_key3
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 77 65 70 5f 6b 65 79 33
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 wep_key3'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='wep_key3'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key3'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 psk
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=17): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 70 73 6b
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 psk'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='psk'
D/wpa_supplicant(  648): Do not allow key_data field to be exposed
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 proto
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 70 72 6f 74 6f
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 proto'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='proto'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 key_mgmt
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 6b 65 79 5f 6d 67 6d 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 key_mgmt'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='key_mgmt'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 auth_alg
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 61 75 74 68 5f 61 6c 67
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 auth_alg'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='auth_alg'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 pairwise
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 70 61 69 72 77 69 73 65
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 pairwise'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='pairwise'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 group
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 67 72 6f 75 70
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 group'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='group'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 eap
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=17): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 65 61 70
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 eap'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='eap'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'eap'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 phase2
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 70 68 61 73 65 32
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 phase2'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='phase2'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'phase2'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 identity
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 69 64 65 6e 74 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 identity'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='identity'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'identity'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 anonymous_identity
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=32): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 61 6e 6f 6e 79 6d 6f 75 73 5f 69 64 65 6e 74 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 anonymous_identity'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='anonymous_identity'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'anonymous_identity'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 password
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 70 61 73 73 77 6f 72 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 password'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='password'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'password'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 client_cert
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=25): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 63 6c 69 65 6e 74 5f 63 65 72 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 client_cert'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='client_cert'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'client_cert'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 ca_cert
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=21): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 63 61 5f 63 65 72 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 ca_cert'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='ca_cert'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'ca_cert'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 subject_match
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=27): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 73 75 62 6a 65 63 74 5f 6d 61 74 63 68
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 subject_match'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='subject_match'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'subject_match'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 engine
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 65 6e 67 69 6e 65
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 engine'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='engine'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 engine_id
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=23): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 65 6e 67 69 6e 65 5f 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 engine_id'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='engine_id'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'engine_id'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 key_id
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 6b 65 79 5f 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 key_id'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='key_id'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'key_id'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 7 private_key
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=25): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 37 20 70 72 69 76 61 74 65 5f 6b 65 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 7 private_key'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=7 name='private_key'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'private_key'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 ssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=18): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 ssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='ssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 bssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 62 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 bssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='bssid'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'bssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 priority
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 70 72 69 6f 72 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 priority'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='priority'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 scan_ssid
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=23): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 73 63 61 6e 5f 73 73 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 scan_ssid'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='scan_ssid'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 wep_tx_keyidx
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=27): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 77 65 70 5f 74 78 5f 6b 65 79 69 64 78
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 wep_tx_keyidx'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='wep_tx_keyidx'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 wep_key0
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 77 65 70 5f 6b 65 79 30
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 wep_key0'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='wep_key0'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key0'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 wep_key1
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 77 65 70 5f 6b 65 79 31
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 wep_key1'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='wep_key1'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key1'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 wep_key2
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 77 65 70 5f 6b 65 79 32
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 wep_key2'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='wep_key2'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key2'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 wep_key3
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 77 65 70 5f 6b 65 79 33
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 wep_key3'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='wep_key3'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'wep_key3'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 psk
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=17): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 70 73 6b
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 psk'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='psk'
D/wpa_supplicant(  648): Do not allow key_data field to be exposed
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 proto
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 70 72 6f 74 6f
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 proto'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='proto'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 key_mgmt
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 6b 65 79 5f 6d 67 6d 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 key_mgmt'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='key_mgmt'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 auth_alg
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 61 75 74 68 5f 61 6c 67
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 auth_alg'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='auth_alg'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 pairwise
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 70 61 69 72 77 69 73 65
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 pairwise'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='pairwise'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 group
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 67 72 6f 75 70
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 group'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='group'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 eap
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=17): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 65 61 70
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 eap'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='eap'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'eap'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 phase2
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 70 68 61 73 65 32
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 phase2'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='phase2'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'phase2'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 identity
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 69 64 65 6e 74 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 identity'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='identity'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'identity'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 anonymous_identity
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=32): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 61 6e 6f 6e 79 6d 6f 75 73 5f 69 64 65 6e 74 69 74 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 anonymous_identity'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='anonymous_identity'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'anonymous_identity'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 password
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=22): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 70 61 73 73 77 6f 72 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 password'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='password'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'password'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 client_cert
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=25): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 63 6c 69 65 6e 74 5f 63 65 72 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 client_cert'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='client_cert'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'client_cert'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 ca_cert
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=21): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 63 61 5f 63 65 72 74
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 ca_cert'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='ca_cert'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'ca_cert'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 subject_match
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=27): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 73 75 62 6a 65 63 74 5f 6d 61 74 63 68
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 subject_match'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='subject_match'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'subject_match'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 engine
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 65 6e 67 69 6e 65
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 engine'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='engine'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 engine_id
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=23): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 65 6e 67 69 6e 65 5f 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 engine_id'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='engine_id'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'engine_id'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 key_id
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=20): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 6b 65 79 5f 69 64
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 key_id'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='key_id'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'key_id'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: GET_NETWORK 9 private_key
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=25): 47 45 54 5f 4e 45 54 57 4f 52 4b 20 39 20 70 72 69 76 61 74 65 5f 6b 65 79
D/wpa_supplicant(  648): wlan0: Control interface command 'GET_NETWORK 9 private_key'
D/wpa_supplicant(  648): CTRL_IFACE: GET_NETWORK id=9 name='private_key'
D/wpa_supplicant(  648): CTRL_IFACE: Failed to get network variable 'private_key'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: SIGNAL_POLL
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=11): 53 49 47 4e 41 4c 5f 50 4f 4c 4c
D/wpa_supplicant(  648): wlan0: Control interface command 'SIGNAL_POLL'
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: DRIVER BTCOEXMODE 1
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 44 52 49 56 45 52 20 42 54 43 4f 45 58 4d 4f 44 45 20 31
D/wpa_supplicant(  648): wlan0: Control interface command 'DRIVER BTCOEXMODE 1'
D/wpa_supplicant(  648): wpa_driver_nl80211_driver_cmd  len = 0, 0
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: DRIVER SETSUSPENDMODE 0
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=23): 44 52 49 56 45 52 20 53 45 54 53 55 53 50 45 4e 44 4d 4f 44 45 20 30
D/wpa_supplicant(  648): wlan0: Control interface command 'DRIVER SETSUSPENDMODE 0'
D/wpa_supplicant(  648): wpa_driver_nl80211_driver_cmd OK len = 0, 2
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: SET ps 0
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=8): 53 45 54 20 70 73 20 30
D/wpa_supplicant(  648): wlan0: Control interface command 'SET ps 0'
D/wpa_supplicant(  648): CTRL_IFACE SET 'ps'='0'
D/wpa_supplicant(  648): nl80211: set_p2p_powersave (legacy_ps=0 opp_ps=-1 ctwindow=-1)
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: DRIVER WLS_BATCHING GET
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=23): 44 52 49 56 45 52 20 57 4c 53 5f 42 41 54 43 48 49 4e 47 20 47 45 54
D/wpa_supplicant(  648): wlan0: Control interface command 'DRIVER WLS_BATCHING GET'
D/wpa_supplicant(  648): wpa_driver_nl80211_driver_cmd OK len = 2, 2
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: DRIVER WLS_BATCHING STOP
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=24): 44 52 49 56 45 52 20 57 4c 53 5f 42 41 54 43 48 49 4e 47 20 53 54 4f 50
D/wpa_supplicant(  648): wlan0: Control interface command 'DRIVER WLS_BATCHING STOP'
D/wpa_supplicant(  648): wpa_driver_nl80211_driver_cmd OK len = 2, 2
D/wpa_supplicant(  648): EAPOL: startWhen --> 0
D/wpa_supplicant(  648): EAPOL: disable timer tick
I/dhcpcd  ( 1255): version 5.5.6 starting
E/dhcpcd  ( 1255): get_duid: Read-only file system
I/dhcpcd  ( 1255): wlan0: rebinding lease of 192.168.100.27
I/dhcpcd  ( 1255): wlan0: acknowledged 192.168.100.27 from 192.168.100.1
I/dhcpcd  ( 1255): wlan0: leased 192.168.100.27 for 86400 seconds
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: SET ps 1
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=8): 53 45 54 20 70 73 20 31
D/wpa_supplicant(  648): wlan0: Control interface command 'SET ps 1'
D/wpa_supplicant(  648): CTRL_IFACE SET 'ps'='1'
D/wpa_supplicant(  648): nl80211: set_p2p_powersave (legacy_ps=1 opp_ps=-1 ctwindow=-1)
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: DRIVER BTCOEXMODE 2
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=19): 44 52 49 56 45 52 20 42 54 43 4f 45 58 4d 4f 44 45 20 32
D/wpa_supplicant(  648): wlan0: Control interface command 'DRIVER BTCOEXMODE 2'
D/wpa_supplicant(  648): wpa_driver_nl80211_driver_cmd  len = 0, 0
I/wpa_supplicant(  648): [CTRL_IFACE]wlan0: SIGNAL_POLL
D/wpa_supplicant(  648): RX ctrl_iface - hexdump(len=11): 53 49 47 4e 41 4c 5f 50 4f 4c 4c
D/wpa_supplicant(  648): wlan0: Control interface command 'SIGNAL_POLL'

###################################### DISCONNECTING####################################################################
D/wpa_supplicant(  648): wlan0: RX EAPOL 98:fc:12:d9:a1:f7
D/wpa_supplicant(  648): wlan0: WPA: EAPOL frame too short to be a WPA EAPOL-Key (len 8, expecting at least 99)
D/wpa_supplicant(  648): RTM_NEWLINK: operstate=1 ifi_flags=0x1003 ([UP])
D/wpa_supplicant(  648): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
D/wpa_supplicant(  648): nl80211: if_removed already cleared - ignore event
D/wpa_supplicant(  648): RTM_NEWLINK: operstate=1 ifi_flags=0x1003 ([UP])
D/wpa_supplicant(  648): RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
D/wpa_supplicant(  648): nl80211: if_removed already cleared - ignore event
D/wpa_supplicant(  648): nl80211: Drv Event 48 (NL80211_CMD_DISCONNECT) received for wlan0
D/wpa_supplicant(  648): nl80211: Disconnect event
D/wpa_supplicant(  648): wlan0: Event DEAUTH (12) received
D/wpa_supplicant(  648): wlan0: Deauthentication notification
D/wpa_supplicant(  648): wlan0:  * reason 0
D/wpa_supplicant(  648): Deauthentication frame IE(s) - hexdump(len=0): [NULL]
I/wpa_supplicant(  648): wlan0: CTRL-EVENT-DISCONNECTED bssid=98:fc:12:d9:a1:f7 reason=0
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant(  648): wlan0: Auto connect disabled: do not try to re-connect
D/wpa_supplicant(  648): wlan0: Ignore connection failure indication since interface has been put into disconnected state
D/wpa_supplicant(  648): TDLS: Remove peers on disassociation
D/wpa_supplicant(  648): wlan0: Disconnect event - remove keys
D/wpa_supplicant(  648): wpa_driver_nl80211_set_key: ifindex=2 (wlan0) alg=0 addr=0x0 key_idx=0 set_tx=0 seq_len=0 key_len=0
D/wpa_supplicant(  648): wpa_driver_nl80211_set_key: ifindex=2 (wlan0) alg=0 addr=0x0 key_idx=1 set_tx=0 seq_len=0 key_len=0
D/wpa_supplicant(  648): wpa_driver_nl80211_set_key: ifindex=2 (wlan0) alg=0 addr=0x0 key_idx=2 set_tx=0 seq_len=0 key_len=0
D/wpa_supplicant(  648): wpa_driver_nl80211_set_key: ifindex=2 (wlan0) alg=0 addr=0x0 key_idx=3 set_tx=0 seq_len=0 key_len=0
D/wpa_supplicant(  648): wpa_driver_nl80211_set_key: ifindex=2 (wlan0) alg=0 addr=0x7691cba4 key_idx=0 set_tx=0 seq_len=0 key_len=0
D/wpa_supplicant(  648): wlan0: State: COMPLETED -> DISCONNECTED
D/wpa_supplicant(  648): wpa_driver_nl80211_set_operstate: operstate 1->0 (DORMANT)
D/wpa_supplicant(  648): netlink: Operstate: linkmode=-1, operstate=5
D/wpa_supplicant(  648): CTRL_IFACE monitor send - hexdump(len=39): 2f 64 61 74 61 2f 6d 69 73 63 2f 77 69 66 69 2f 73 6f 63 6b 65 74 73 2f 77 70 61 5f 63 74 72 6c ...
D/wpa_supplicant(  648): EAPOL: External notification - portEnabled=0
D/wpa_supplicant(  648): EAPOL: SUPP_PAE entering state DISCONNECTED
D/wpa_supplicant(  648): EAPOL: Supplicant port status: Unauthorized
D/wpa_supplicant(  648): nl80211: Set supplicant port unauthorized for 00:00:00:00:00:00
D/wpa_supplicant(  648): EAPOL: SUPP_BE entering state INITIALIZE
D/wpa_supplicant(  648): EAPOL: Supplicant port status: Unauthorized
D/wpa_supplicant(  648): nl80211: Set supplicant port unauthorized for 00:00:00:00:00:00
D/wpa_supplicant(  648): EAPOL: External notification - portValid=0
D/wpa_supplicant(  648): EAPOL: Supplicant port status: Unauthorized
D/wpa_supplicant(  648): nl80211: Set supplicant port unauthorized for 00:00:00:00:00:00
D/wpa_supplicant(  648): EAPOL: External notification - EAP success=0
D/wpa_supplicant(  648): EAPOL: Supplicant port status: Unauthorized
D/wpa_supplicant(  648): nl80211: Set supplicant port unauthorized for 00:00:00:00:00:00


From j at w1.fi  Sun Nov 29 01:16:57 2015
From: j at w1.fi (Jouni Malinen)
Date: Sun, 29 Nov 2015 11:16:57 +0200
Subject: WPS DISCONNECT ISSUE
In-Reply-To: <20151128072709.11621rqc7r3h5g2l@iwavesystems.com>
References: <20151128072709.11621rqc7r3h5g2l@iwavesystems.com>
Message-ID: <20151129091657.GA3087@w1.fi>

On Sat, Nov 28, 2015 at 07:27:09AM -0500, anjalik at iwavesystems.com wrote:
>  I am facing an issue while testing the WPS Push button in Android ,
> the connection is fine ,but disconnecting suddenly. The sniffer
> capture says "Unspecified reason" as the cause for deauthentication.
> Also the sequence number seems to be litte different from the
> working case
> 
> Authenticator sends EAPOL key packet with sequence number 0 ,
> supplicant sends EAPOL Key packet back to authenticator with
> sequence number 1.(It IS zero in working case).

I'm not sure what you are referring to with "sequence number" here, but
anyway, the issue in the log seemed to be strange AP behavior where a
short EAPOL frame is sent after the successfully completely 4-way
handshake. That short EAPOL frame is followed by the AP
deauthenticating the station.

What is that short EAPOL frame (sniffer capture should show it)? Is it
EAP-Failure?

Which AP is used here?

-- 
Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Sun Nov 29 01:20:14 2015
From: j at w1.fi (Jouni Malinen)
Date: Sun, 29 Nov 2015 11:20:14 +0200
Subject: Updating deny acl mac list during runtime
In-Reply-To: <CAL5UD9b0QYD+0mshM6HgZ+rHMnCc+99canaMVZCqNSrzpnfreA@mail.gmail.com>
References: <CAL5UD9b0QYD+0mshM6HgZ+rHMnCc+99canaMVZCqNSrzpnfreA@mail.gmail.com>
Message-ID: <20151129092014.GB3087@w1.fi>

On Sun, Nov 22, 2015 at 09:50:15PM +0200, Eli Balta wrote:
> I need to be able to dynamically add and remove hosts from the mac
> filter list depending on various events.
> What I'm doing right now is:
> 1) add/remove mac entry in /etc/hostapd.deny
> 2) send "SET deny_mac_file /etc/hostapd.deny" to the ctrl iface at
> /var/run/hostapd/...
> 
> The problem:
> This works only for adding entries to the list, if I remove an entry
> and send the "SET deny_mac_file /etc/hostapd.deny" command, it
> succeeds, but the STA is still denied authentication whenever it tries
> to connect.
> 
> Is there any way to solve this problem without having to make
> modifications to the code?

If you do not want to stop and restart the BSS to do this, then probably
not. There was a recent patch to add a new control interface command for
adding MAC ACL entries and something similar would likely need to be
added to remove MAC ACL entries to cover the case you describe here.

-- 
Jouni Malinen                                            PGP id EFC895FA


From matteo at openwrt.org  Sun Nov 29 03:45:17 2015
From: matteo at openwrt.org (Matteo Croce)
Date: Sun, 29 Nov 2015 12:45:17 +0100
Subject: Updating deny acl mac list during runtime
In-Reply-To: <20151129092014.GB3087@w1.fi>
References: <CAL5UD9b0QYD+0mshM6HgZ+rHMnCc+99canaMVZCqNSrzpnfreA@mail.gmail.com>
 <20151129092014.GB3087@w1.fi>
Message-ID: <CAFnufp0uqBcZSG_aF2DKz_+Bvtw7230iN=jj531ONtU5NHxi9Q@mail.gmail.com>

I did a patch to add s station to the deny list with a command BAN,
it's in the mailing list

2015-11-29 10:20 GMT+01:00 Jouni Malinen <j at w1.fi>:
> On Sun, Nov 22, 2015 at 09:50:15PM +0200, Eli Balta wrote:
>> I need to be able to dynamically add and remove hosts from the mac
>> filter list depending on various events.
>> What I'm doing right now is:
>> 1) add/remove mac entry in /etc/hostapd.deny
>> 2) send "SET deny_mac_file /etc/hostapd.deny" to the ctrl iface at
>> /var/run/hostapd/...
>>
>> The problem:
>> This works only for adding entries to the list, if I remove an entry
>> and send the "SET deny_mac_file /etc/hostapd.deny" command, it
>> succeeds, but the STA is still denied authentication whenever it tries
>> to connect.
>>
>> Is there any way to solve this problem without having to make
>> modifications to the code?
>
> If you do not want to stop and restart the BSS to do this, then probably
> not. There was a recent patch to add a new control interface command for
> adding MAC ACL entries and something similar would likely need to be
> added to remove MAC ACL entries to cover the case you describe here.
>
> --
> Jouni Malinen                                            PGP id EFC895FA
>
> _______________________________________________
> Hostap mailing list
> Hostap at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/hostap



-- 
Matteo Croce
OpenWrt Developer
  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 CHAOS CALMER (15.05)
 -----------------------------------------------------
  * 1 1/2 oz Gin            Shake with a glassful
  * 1/4 oz Triple Sec       of broken ice and pour
  * 3/4 oz Lime Juice       unstrained into a goblet.
  * 1 1/2 oz Orange Juice
  * 1 tsp. Grenadine Syrup
 -----------------------------------------------------


From eliba86 at gmail.com  Sun Nov 29 02:36:45 2015
From: eliba86 at gmail.com (Eli Balta)
Date: Sun, 29 Nov 2015 12:36:45 +0200
Subject: Updating deny acl mac list during runtime
In-Reply-To: <20151129092014.GB3087@w1.fi>
References: <CAL5UD9b0QYD+0mshM6HgZ+rHMnCc+99canaMVZCqNSrzpnfreA@mail.gmail.com>
 <20151129092014.GB3087@w1.fi>
Message-ID: <CAL5UD9bWAsBezpx9TuzRV3PNKwymz59xUZyYkVnsY5ouqUtBJg@mail.gmail.com>

Hi Jouni,

I have managed to solve my problem.
I was working with hostapd v2.1 which does not have such a feature.
After looking at the code in hostapd v2.5, I've noticed after that
adding "-" before a mac entry in the deny file and then issuing the
"SET deny_mac_file" command, the entries actually do get removed from
the acl table.

On Sun, Nov 29, 2015 at 11:20 AM, Jouni Malinen <j at w1.fi> wrote:
> On Sun, Nov 22, 2015 at 09:50:15PM +0200, Eli Balta wrote:
>> I need to be able to dynamically add and remove hosts from the mac
>> filter list depending on various events.
>> What I'm doing right now is:
>> 1) add/remove mac entry in /etc/hostapd.deny
>> 2) send "SET deny_mac_file /etc/hostapd.deny" to the ctrl iface at
>> /var/run/hostapd/...
>>
>> The problem:
>> This works only for adding entries to the list, if I remove an entry
>> and send the "SET deny_mac_file /etc/hostapd.deny" command, it
>> succeeds, but the STA is still denied authentication whenever it tries
>> to connect.
>>
>> Is there any way to solve this problem without having to make
>> modifications to the code?
>
> If you do not want to stop and restart the BSS to do this, then probably
> not. There was a recent patch to add a new control interface command for
> adding MAC ACL entries and something similar would likely need to be
> added to remove MAC ACL entries to cover the case you describe here.
>
> --
> Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Sun Nov 29 15:47:47 2015
From: j at w1.fi (Jouni Malinen)
Date: Mon, 30 Nov 2015 01:47:47 +0200
Subject: [PATCH 0/4] TLS client: Improve certificate validation
In-Reply-To: <1448154178-17670-1-git-send-email-pali.rohar@gmail.com>
References: <1448154178-17670-1-git-send-email-pali.rohar@gmail.com>
Message-ID: <20151129234747.GA8151@w1.fi>

On Sun, Nov 22, 2015 at 02:02:54AM +0100, Pali Roh?r wrote:
> This patch series implements hash://server/sha256/cert_hash_in_hex syntax for
> ca_cert property, correctly skip validation if ca_cert is not specified and
> implements validation for certificate with SHA384 and SHA512 hashes.
> 
> Pali Roh?r (4):
>   TLS client: Do not verify CA certificates when ca_cert is not
>     specified
>   TLS client: Add support for validating server certificate
>   Crypto: Add SHA384 and SHA512 implementation from LibTomCrypt library
>   TLS client: Validate certificates with SHA384 and SHA512 hashes

Thanks, applied with some cleanup.
 
-- 
Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Sun Nov 29 15:48:07 2015
From: j at w1.fi (Jouni Malinen)
Date: Mon, 30 Nov 2015 01:48:07 +0200
Subject: [PATCH] tests: run-tests: print more details about NameError
In-Reply-To: <1448650498-7747-1-git-send-email-johannes@sipsolutions.net>
References: <1448650498-7747-1-git-send-email-johannes@sipsolutions.net>
Message-ID: <20151129234807.GB8151@w1.fi>

On Fri, Nov 27, 2015 at 07:54:58PM +0100, Johannes Berg wrote:
> If encountering a NameError, print the entire traceback so that
> it's actually debuggable.

Thanks, applied.
 
-- 
Jouni Malinen                                            PGP id EFC895FA


From m.olbrich at pengutronix.de  Mon Nov 30 02:54:39 2015
From: m.olbrich at pengutronix.de (Michael Olbrich)
Date: Mon, 30 Nov 2015 11:54:39 +0100
Subject: wpas_p2p_group_formation_timeout and p2p_group_formation
Message-ID: <20151130105439.GE2416@pengutronix.de>

Hi,

I am experiencing some problems with P2P connections as client. From what I
can tell what happens is this:

in wpas_p2p_wps_success():
[...]
wpa_s->p2p_go_group_formation_completed = 1;
[...]
eloop_register_timeout(P2P_MAX_INITIAL_CONN_WAIT, 0,
		       wpas_p2p_group_formation_timeout,
		       wpa_s->parent, NULL);
[...]
wpas_group_formation_completed(wpa_s, 1, 0);

and then in wpas_group_formation_completed():
[...]
wpa_s->global->p2p_group_formation = NULL;
[...]

This causes two problems:
1. p2p_ext_listen_timeout() calls p2p_listen() because is_p2p_in_progress()
returns 0. At least on my hardware (Intel Corporation Wireless 7260) this
breaks connecting if the p2p_listen() happens before the group is really
fully ready.

2. If the peer cancels the connection at this point and
wpas_p2p_group_formation_timeout() is called, then
wpas_group_formation_completed() uses the wrong wpa_s (the management
interface) because "wpa_s->global->p2p_group_formation" is no longer set.

I 'fixed' this by not clearing p2p_group_formation in
wpas_group_formation_completed() (see diff below). But I don't think this
is the correct solution. Maybe p2p_go_group_formation_completed needs to be
handled differently?

Regards,
Michael

diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index a60ae6e67668..cc478afabc6e 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -1307,7 +1307,6 @@ static void wpas_group_formation_completed(struct wpa_supplicant *wpa_s,
 	if (wpa_s->global->p2p_group_formation)
 		wpa_s = wpa_s->global->p2p_group_formation;
 	if (wpa_s->p2p_go_group_formation_completed) {
-		wpa_s->global->p2p_group_formation = NULL;
 		wpa_s->p2p_in_provisioning = 0;
 	}
 	wpa_s->p2p_in_invitation = 0;

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


From johannes at sipsolutions.net  Mon Nov 30 02:59:09 2015
From: johannes at sipsolutions.net (Johannes Berg)
Date: Mon, 30 Nov 2015 11:59:09 +0100
Subject: [PATCH] tests: allow passing more arguments to vm-run.sh
Message-ID: <1448881149-31793-1-git-send-email-johannes@sipsolutions.net>

From: Johannes Berg <johannes.berg at intel.com>

The script is currently limited by the maximum kernel command
line length and if that's exceeded the kernel panics at boot.
Fix this by writing the arguments to a file and reading it in
the VM.

Signed-off-by: Johannes Berg <johannes.berg at intel.com>
---
 tests/hwsim/vm/inside.sh |  8 ++++++--
 tests/hwsim/vm/vm-run.sh | 13 ++++++++++++-
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/tests/hwsim/vm/inside.sh b/tests/hwsim/vm/inside.sh
index a060bc5dc11e..8112ab4b216f 100755
--- a/tests/hwsim/vm/inside.sh
+++ b/tests/hwsim/vm/inside.sh
@@ -24,7 +24,7 @@ sysctl kernel.panic=1
 TESTDIR=$(sed 's/.*testdir=\([^ ]*\) .*/\1/' /proc/cmdline)
 TIMEWARP=$(sed 's/.*timewarp=\([^ ]*\) .*/\1/' /proc/cmdline)
 EPATH=$(sed 's/.*EPATH=\([^ ]*\) .*/\1/' /proc/cmdline)
-ARGS=$(sed 's/.*ARGS=//' /proc/cmdline)
+ARGS=$(sed 's/.*ARGS=\([^ ]*\)\( \|$\).*/\1/' /proc/cmdline)
 
 # create /dev entries we need
 mknod -m 660 /dev/ttyS0 c 4 64
@@ -80,6 +80,10 @@ ip link set lo up
 mkdir /tmp/logs
 mount -t 9p -o trans=virtio,rw logshare /tmp/logs
 
+# allow access to any outside directory (e.g. /tmp) we also have
+mkdir /tmp/host
+mount --bind / /tmp/host
+
 if [ "$TIMEWARP" = "1" ] ; then
     (
         while sleep 1 ; do
@@ -109,7 +113,7 @@ else
 	dbus-daemon --config-file=$TESTDIR/vm/dbus.conf --fork
 
 	cd $TESTDIR
-	./run-all.sh $ARGS </dev/ttyS0 >/dev/ttyS0 2>&1
+	./run-all.sh $(cat /tmp/host$ARGS) </dev/ttyS0 >/dev/ttyS0 2>&1
 	if test -d /sys/kernel/debug/gcov ; then
 		cp -ar /sys/kernel/debug/gcov /tmp/logs/
 		# these are broken as they're updated while being read ...
diff --git a/tests/hwsim/vm/vm-run.sh b/tests/hwsim/vm/vm-run.sh
index ab4df4c100be..c0ef5b0fe4f9 100755
--- a/tests/hwsim/vm/vm-run.sh
+++ b/tests/hwsim/vm/vm-run.sh
@@ -113,6 +113,17 @@ for kvmprog in kvm qemu-kvm; do
     fi
 done
 
+argsfile=$(mktemp)
+if [ $? -ne 0 ] ; then
+	exit 2
+fi
+function finish {
+	rm -f $argsfile
+}
+trap finish EXIT
+
+echo "$RUN_TEST_ARGS" > $argsfile
+
 $KVM \
 	-kernel $KERNEL -smp 4 \
 	$KVMARGS -m $MEMORY -nographic \
@@ -121,7 +132,7 @@ $KVM \
 	-fsdev local,security_model=none,id=fsdev-logs,path="$LOGDIR",writeout=immediate \
 	-device virtio-9p-pci,id=fs-logs,fsdev=fsdev-logs,mount_tag=logshare \
 	-monitor null -serial stdio -serial file:$LOGDIR/console \
-	-append "mac80211_hwsim.support_p2p_device=0 mac80211_hwsim.channels=$CHANNELS mac80211_hwsim.radios=7 init=$CMD testdir=$TESTDIR timewarp=$TIMEWARP console=$KVMOUT root=/dev/root rootflags=trans=virtio,version=9p2000.u ro rootfstype=9p EPATH=$EPATH ARGS=$RUN_TEST_ARGS"
+	-append "mac80211_hwsim.support_p2p_device=0 mac80211_hwsim.channels=$CHANNELS mac80211_hwsim.radios=7 init=$CMD testdir=$TESTDIR timewarp=$TIMEWARP console=$KVMOUT root=/dev/root rootflags=trans=virtio,version=9p2000.u ro rootfstype=9p EPATH=$EPATH ARGS=$argsfile"
 
 if [ $CODECOV = "yes" ]; then
     echo "Preparing code coverage reports"
-- 
2.6.2



From j at w1.fi  Mon Nov 30 08:57:49 2015
From: j at w1.fi (Jouni Malinen)
Date: Mon, 30 Nov 2015 18:57:49 +0200
Subject: [PATCH 0/2] Scheduled Scan Plans
In-Reply-To: <1447765704-14553-1-git-send-email-ilan.peer@intel.com>
References: <1447765704-14553-1-git-send-email-ilan.peer@intel.com>
Message-ID: <20151130165749.GA28157@w1.fi>

On Tue, Nov 17, 2015 at 03:08:22PM +0200, Ilan Peer wrote:
> Add support for scan plans for scheduled scan. Each scan plan
> specifies the number of iterations to run the scan request and
> the interval between iterations. When a scan plan finishes
> (i.e., it was run for the specified number of iterations),
> the next scan plan is executed. The last scan plan will run
> infinitely
> 
> The patch set depends on the latest nl80211.h from mac80211-next.
> 
> Avraham Stern (2):
>   driver: Add support for multiple scan plans for scheduled scan
>   wpa_supplicant: Add support for scheduled scan plans configurations

Thanks, applied.
 
-- 
Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Mon Nov 30 08:58:11 2015
From: j at w1.fi (Jouni Malinen)
Date: Mon, 30 Nov 2015 18:58:11 +0200
Subject: [PATCH] tests: allow passing more arguments to vm-run.sh
In-Reply-To: <1448881149-31793-1-git-send-email-johannes@sipsolutions.net>
References: <1448881149-31793-1-git-send-email-johannes@sipsolutions.net>
Message-ID: <20151130165811.GB28157@w1.fi>

On Mon, Nov 30, 2015 at 11:59:09AM +0100, Johannes Berg wrote:
> The script is currently limited by the maximum kernel command
> line length and if that's exceeded the kernel panics at boot.
> Fix this by writing the arguments to a file and reading it in
> the VM.

Thanks, applied.
 
-- 
Jouni Malinen                                            PGP id EFC895FA


From j at w1.fi  Mon Nov 30 11:47:34 2015
From: j at w1.fi (Jouni Malinen)
Date: Mon, 30 Nov 2015 21:47:34 +0200
Subject: wpas_p2p_group_formation_timeout and p2p_group_formation
In-Reply-To: <20151130105439.GE2416@pengutronix.de>
References: <20151130105439.GE2416@pengutronix.de>
Message-ID: <20151130194734.GA8862@w1.fi>

On Mon, Nov 30, 2015 at 11:54:39AM +0100, Michael Olbrich wrote:
> I am experiencing some problems with P2P connections as client. From what I
> can tell what happens is this:
> 
> in wpas_p2p_wps_success():
> [...]
> wpa_s->p2p_go_group_formation_completed = 1;
> [...]
> eloop_register_timeout(P2P_MAX_INITIAL_CONN_WAIT, 0,
> 		       wpas_p2p_group_formation_timeout,
> 		       wpa_s->parent, NULL);
> [...]
> wpas_group_formation_completed(wpa_s, 1, 0);
> 
> and then in wpas_group_formation_completed():
> [...]
> wpa_s->global->p2p_group_formation = NULL;
> [...]

This does not look ideal.. I was able to reproduce this with hwsim test
scripts. The GO case works fine since it postpones marking the group
completed until the first client connects for an actual data association
while the P2P Client role fails because of not finding the group.

> This causes two problems:
> 1. p2p_ext_listen_timeout() calls p2p_listen() because is_p2p_in_progress()
> returns 0. At least on my hardware (Intel Corporation Wireless 7260) this
> breaks connecting if the p2p_listen() happens before the group is really
> fully ready.

This could be fixed in other ways, but since
wpa_s->global->p2p_group_formation is going to be needed anyway, that
can take care of the issue here.. That said, even if there were an
extended listen operation with reasonably short duration, that should
work during connection operations.

> 2. If the peer cancels the connection at this point and
> wpas_p2p_group_formation_timeout() is called, then
> wpas_group_formation_completed() uses the wrong wpa_s (the management
> interface) because "wpa_s->global->p2p_group_formation" is no longer set.

This is not good.. That pointer needs to be maintained as long as there
is possibility of group formation timeout getting hit.

> I 'fixed' this by not clearing p2p_group_formation in
> wpas_group_formation_completed() (see diff below). But I don't think this
> is the correct solution. Maybe p2p_go_group_formation_completed needs to be
> handled differently?

In practice, that clearing of p2p_group_formation may happen due to
wpa_s->p2p_go_group_formation_completed being 0 here in the future, but
anyway, that is not the only change that's needed to handle this
properly. I think the following changes should handle this. At least
they fixed the hwsim test script I wrote for reproducing this.


P2P: Complete group formation on client data connection

This was already the case in the GO role where the first client
connection is waited before marking
wpa_s->p2p_go_group_formation_completed = 1 and clearing
wpa_s->global->p2p_group_formation. However, in the P2P Client role,
that was done already at the completion of the WPS exchange. This can be
problematic since group formation timeout may still try to clear the
group and with wpa_s->global->p2p_group_formation == NULL, the correct
group interface may not be found.

Fix this by postponing clearing of wpa_s->global->p2p_group_formation on
the P2P Client side until the data connection has been completed and
group is declared started.


diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index a60ae6e..077c5fe 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -6340,6 +6340,8 @@ void wpas_p2p_wps_success(struct wpa_supplicant *wpa_s, const u8 *peer_addr,
 		eloop_register_timeout(P2P_MAX_INITIAL_CONN_WAIT, 0,
 				       wpas_p2p_group_formation_timeout,
 				       wpa_s->parent, NULL);
+		/* Complete group formation on successful data connection. */
+		wpa_s->p2p_go_group_formation_completed = 0;
 	} else if (ssid) {
 		/*
 		 * Use a separate timeout for initial data connection to
@@ -6890,6 +6892,15 @@ void wpas_p2p_completed(struct wpa_supplicant *wpa_s)
 		return;
 
 	wpa_s->show_group_started = 0;
+	if (!wpa_s->p2p_go_group_formation_completed &&
+	    wpa_s->global->p2p_group_formation == wpa_s) {
+		wpa_dbg(wpa_s, MSG_DEBUG,
+			"P2P: Marking group formation completed on client on data connection");
+		wpa_s->p2p_go_group_formation_completed = 1;
+		wpa_s->global->p2p_group_formation = NULL;
+		wpa_s->p2p_in_provisioning = 0;
+		wpa_s->p2p_in_invitation = 0;
+	}
 
 	os_memset(go_dev_addr, 0, ETH_ALEN);
 	if (ssid->bssid_set)
-- 
1.9.1

 
-- 
Jouni Malinen                                            PGP id EFC895FA


