]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
11 years agoAOSP: Set ap_scan to default in case of disassociation
Jouni Malinen [Fri, 1 Nov 2013 11:04:38 +0000 (13:04 +0200)] 
AOSP: Set ap_scan to default in case of disassociation

A rebased version of this AOSP commit:

commit 43007fd3a75a07189a11510e131216284b48e098
Author: Dmitry Shmidt <dimitrysh@google.com>
Date:   Mon Apr 11 15:58:40 2011 -0700

    Set ap_scan to default in case of disassociation

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
11 years agoAOSP: Add SSID to EVENT-STATE-CHANGE
Jouni Malinen [Fri, 1 Nov 2013 11:03:04 +0000 (13:03 +0200)] 
AOSP: Add SSID to EVENT-STATE-CHANGE

This is a part of this AOSP commit:

commit f20a4432808cee548326c4b35c83071ca576a239
Author: Irfan Sheriff <isheriff@google.com>
Date:   Mon Apr 16 16:48:34 2012 -0700

    Add SSID in supplicant change event

    Change-Id: I67224e6765afad51b4b258b0df7d11d7ed3b9927

11 years agoAOSP: Change P2P_MAX_CLIENT_IDLE 10 --> 20
Jouni Malinen [Fri, 1 Nov 2013 11:01:27 +0000 (13:01 +0200)] 
AOSP: Change P2P_MAX_CLIENT_IDLE 10 --> 20

This came in as a part of this AOSP commit:

commit 98f9e76624da6bb96edc1982c423e4a119c5170a
Author: Dmitry Shmidt <dimitrysh@google.com>
Date:   Wed May 30 11:18:46 2012 -0700

    wpa_supplicant: Update to Version 0.8.27 from BRCM

    - Fix crash during TRUE pbc overlap
    - Fix p2p_stop_find event
    - Avoid race condition in GO-NEG process if both peers enter
      p2p_connect at the same time
    - Retry assoc immediately on ASSOC-REJECT. Previously assoc was
      retried on authentication timeout (which occurs after 10secs).
      Now on assoc reject, we cancel the auth timer and then initiate
      a assoc scan.

    BUG: 65437056427094

    Change-Id: I4489fb14b6cead069f0d14fcbb9e2224f790d77b
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
11 years agoAOSP: Restore p2p_group_formation pointer on completion
Jouni Malinen [Fri, 1 Nov 2013 10:57:57 +0000 (12:57 +0200)] 
AOSP: Restore p2p_group_formation pointer on completion

This is a part of the following AOSP commit:

commit 4b86ea55603eded752b5773179884a35e74e1a89
Author: Dmitry Shmidt <dimitrysh@google.com>
Date:   Tue Sep 4 11:06:50 2012 -0700

    wpa_supplicant: Update to BRCM version 0.8.0-38

    - Restore p2p_group_formation pointer till the 4-way handshake
      completes for the p2p client

    Change-Id: I976659ae5dac4cf01ecdd7995ff9abb6bf914bc1
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
11 years agoAOSP: Add WFD dev info in device found event
Jouni Malinen [Fri, 1 Nov 2013 10:55:55 +0000 (12:55 +0200)] 
AOSP: Add WFD dev info in device found event

This is a rebased version of this AOSP commit:

commit 8367dc909f536f600c7474582fe0a96bef7c78fc
Author: Irfan Sheriff <isheriff@google.com>
Date:   Sun Sep 9 17:08:19 2012 -0700

    Add WFD dev info in device found event

    Change-Id: If25804d41e7ea1d028a30c180290d8de547f43e8

11 years agoIncrease channel delay to 100ms
Irfan Sheriff [Wed, 17 Oct 2012 04:40:46 +0000 (21:40 -0700)] 
Increase channel delay to 100ms

There is an inherent flaw in the p2p protocol design where an ACK loss right
before channel switch leads to peers being out of sync.

A work around of 50ms was added persistent case, but it turns out in heavy lossy
conditions that is not enough. Increase it to 100ms.

Experimental evaluation showed 100ms improves the reliability of p2p persistence
reinvocation.

Bug: 7359500
Change-Id: I73ab1b64e32b87101e95b0e487c90818c2c0aaf3

11 years agoAOSP: Leftover edits from old commit
Jouni Malinen [Fri, 1 Nov 2013 10:52:17 +0000 (12:52 +0200)] 
AOSP: Leftover edits from old commit

This came in as a part of the following AOSP commit. The actual
change was since then removed, but the remaining code was not
restored to match the upstream version. This should be reverted.

commit 687922c7347bdc3b4f8c921efe1d1388cb3baac0
Author: Dmitry Shmidt <dimitrysh@google.com>
Date:   Mon Mar 26 14:02:32 2012 -0700

    Update to Version 0.8.24 from BRCM

    - Add 'conc_priority' command
    - Fix handling a single channel concurrency case: If conc_priority
      is not set, advertise the frequency conflict to the framework and
      disable the new connection attempted
    - When P2P Interface gets removed due to single channel frequency
      conflict, show GROUP_REMOVE reason=FREQ_CONFLICT
    - Fix sched scan processing

    Change-Id: Ie6fe105cebd379a0a9c49ace62d2e48e71571107
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
11 years agoFix reporting hidden APs during scan
Dmitry Shmidt [Mon, 22 Aug 2011 22:04:04 +0000 (15:04 -0700)] 
Fix reporting hidden APs during scan

Change-Id: I2f3274c6f89ac0100331f4987c40e23f36577817
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
11 years agoAOSP: Fix scan notification in case of canceling scan
Jouni Malinen [Fri, 1 Nov 2013 10:47:53 +0000 (12:47 +0200)] 
AOSP: Fix scan notification in case of canceling scan

This is rebased version of this AOSP commit:

commit 20df807cb700c516ff346732f1bc8f914d0d26d8
Author: Dmitry Shmidt <dimitrysh@google.com>
Date:   Fri Apr 8 15:35:17 2011 -0700

    Fix scan notification in case of canceling scan

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
11 years agoAllow immediate scan request even if another scan was scheduled later
Dmitry Shmidt [Mon, 14 Nov 2011 23:53:31 +0000 (15:53 -0800)] 
Allow immediate scan request even if another scan was scheduled later

Change-Id: I4f5c021da9ac66464ad422d65c5855fd72f39b41
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
11 years agoAOSP: Skip wpa_supplicant_scan if wpa_s->scanning
Jouni Malinen [Fri, 1 Nov 2013 10:44:52 +0000 (12:44 +0200)] 
AOSP: Skip wpa_supplicant_scan if wpa_s->scanning

This came in as a part of this commit:

commit 5887a9d552f3d9d612011daba073e076daab5b2a
Author: Dmitry Shmidt <dimitrysh@google.com>
Date:   Fri Sep 14 10:47:43 2012 -0700

    wpa_supplicant: Skip unnecessary scan attempts

    Change-Id: Ieea8843c0fcb063dbb1df56e5cdf3fbdd0590cd4
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
11 years agoAOSP: P2P timeout changes for PD
Jouni Malinen [Fri, 1 Nov 2013 10:42:41 +0000 (12:42 +0200)] 
AOSP: P2P timeout changes for PD

These came in as a part of this AOSP commit:

commit 1a2ce111ade9563d99ed7bb8156d6148ffd6c3a3
Author: Irfan Sheriff <isheriff@google.com>
Date:   Tue Oct 30 22:22:52 2012 -0700

    Increase timeouts for p2p

    Dongles can be slow to respond and a quick turn around time on packets does
    Allow for upto 350ms on retry attempts for provision discovery, negotiation

    This will catch slow responses within the first attempt and prevent any kind
    with sequence number handling

    Bug: 7445415
    Change-Id: I88a849d400b10f42ac298bad6d01f49803fcc8ba

11 years agoAOSP: Restore ' (auth)' into WPA-EVENT-CONNECTED
Jouni Malinen [Fri, 1 Nov 2013 10:40:28 +0000 (12:40 +0200)] 
AOSP: Restore ' (auth)' into WPA-EVENT-CONNECTED

This was hidden in this AOSP commit (not in upstream..):

commit f86232838cf712377867cb42417c1613ab5dc425
Author: Dmitry Shmidt <dimitrysh@google.com>
Date:   Wed Feb 20 14:34:59 2013 -0800

    Accumulative patch from commit b618a469c42120e984ab1c85ed6058504d1fca78

      Author: Jouni Malinen <jouni@qca.qualcomm.com>
      Date:   Sat Feb 16 19:54:09 2013 +0200
        Interworking: Select highest priority cred if multiple matches

    Interworking: Select highest priority cred if multiple matches
    GAS server: Fix a regression in GAS server callback
    hostapd: Fix Max SP Length derivation from QoS Info
    nl80211: Configure STA Capabilities and Extended Capabilities
    Synchronize with wireless-testing.git include/uapi/linux/nl80211.h
    WPS: Fix build without CONFIG_WPS_NFC
    WPS: Add support for NFC handover select generation with wpa_supplicant
    WPS: Update NFC connection handover documentation
    WPS: Add support for config token generation with wpa_supplicant
    WPS: Allow password token to be written with nfcpy
    WPS: Use pre-configured NFC password token instead of overriding it
    TDLS: Pass peer's Capability and Ext Capability info during sta_add
    TDLS: Pass peer's HT Capability and QOS information during sta_add
    nl80211: Add debug prints for STA add/set operations
    TDLS: Fix add/set STA operation
    Synchronize with wireless-testing.git include/uapi/linux/nl80211.h
    WPS: Allow Device Password to be changed from M1 to M2
    WPS: Fix wps_reg nfc-pw option
    TDLS: Tear down peers when disconnecting from the AP
    P2P: Do not use old scan result data for peer discovery
    Use more accurate timestamps for scan results
    P2P: Postpone P2P-DEVICE-FOUND if config_methods not known
    P2P: Do not allow peer update to clear config_methods
    WPS: Report NFC connection handover completion differently
    P2P: Avoid concurrent scans during all steps of group formation
    P2P: Cancel group formation timeout on group removal (on client)
    WPS: Change listen time to match nfcpy default (250 ms)
    WPS: Report only the carrier record from NFC to wpa_supplicant
    WPS: Fetch only the carrier record from wpa_supplicant for NFC
    WPS: Update nfcpy script to support AP mode NFC connection handover
    WPS: Add command for fetching carrier record for NFC handover
    WPS: Clean up debug prints with nfcpy
    WPS: Remove 0.5 sec extra wait from NFC handover with nfcpy
    WPS: Use alternating poll/listen for NFC peer discovery with nfcpy
    WPS: Configure logging to show nfcpy log message
    WPS: Add an example python script for NFC operations with hostapd
    hostapd: Do not change HT40 capability due to OBSS scan
    dbus: Add missing signal description for WPS (7)
    EAP peer: Add Session-Id derivation to more EAP methods
    EAP peer: Add Session-Id derivation
    EAP-IKEV2 server: Fix invalid memory freeing operation
    eap_proxy: Add a dummy implementation for compilation testing
    eap_proxy: Add mechanism for allowing EAP methods to be offloaded
    Android: Allow setgroups to be overridden from build configuration
    P2P: Send p2p_stop_find event on failure to start pending p2p_find
    P2P: Fix GO Probe Response IEs when Wi-Fi Display is enabled
    Capability matching for 60 GHz band
    nl80211: Add ctrl_iface message for AP mode connection rejection
    P2P: Allow local configuration to use 5 GHz band 40 MHz channels
    Fix BSS RANGE command for no exact id match cases

    Change-Id: Iac9284bba31db40911aecc3adf2843c9b1576db1
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
11 years agoAOSP: nl80211 modification for _shared_freq
Jouni Malinen [Fri, 1 Nov 2013 10:38:38 +0000 (12:38 +0200)] 
AOSP: nl80211 modification for _shared_freq

This came in as a part of this AOSP commit:

commit 1f69aa52ea2e0a73ac502565df8c666ee49cab6a
Author: Dmitry Shmidt <dimitrysh@google.com>
Date:   Tue Jan 24 16:10:04 2012 -0800

    Update to new version 0.8.16 from BRCM

    Sync with main tree commit b8349523e460493fa0b4de36c689595109e45e91
    Author: Neeraj Kumar Garg <neerajkg@broadcom.com>
    Date:   Tue Dec 27 23:21:45 2011 +0200
        P2P: Reject p2p_group_add if forced frequency is not acceptable

    Change-Id: Icb4541a371b05c270e80440d7a7fdea7f33ff61e
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
11 years agoAOSP: nl80211: device_ap_sme/use_monitor changes
Jouni Malinen [Fri, 1 Nov 2013 10:36:37 +0000 (12:36 +0200)] 
AOSP: nl80211: device_ap_sme/use_monitor changes

These came as part of this AOSP commit:

commit b638fe75d3cb9d21c67386173f10afe65053cc4d
Author: Dmitry Shmidt <dimitrysh@google.com>
Date:   Tue Mar 20 12:51:25 2012 -0700

    nl80211: Use native cfg80211 sta events

    Change-Id: Id59cc4af50dbccd283db2ec3e7b0b6f8c2146e68
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
11 years agoAOSP: nl80211 use_multi_chan_concurrent=1 parameter
Jouni Malinen [Fri, 1 Nov 2013 10:33:56 +0000 (12:33 +0200)] 
AOSP: nl80211 use_multi_chan_concurrent=1 parameter

This came as part of this AOSP commit:

commit 1f69aa52ea2e0a73ac502565df8c666ee49cab6a
Author: Dmitry Shmidt <dimitrysh@google.com>
Date:   Tue Jan 24 16:10:04 2012 -0800

    Update to new version 0.8.16 from BRCM

    Sync with main tree commit b8349523e460493fa0b4de36c689595109e45e91
    Author: Neeraj Kumar Garg <neerajkg@broadcom.com>
    Date:   Tue Dec 27 23:21:45 2011 +0200
        P2P: Reject p2p_group_add if forced frequency is not acceptable

    Change-Id: Icb4541a371b05c270e80440d7a7fdea7f33ff61e
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
11 years agoAOSP: Customized STA reconnection behavior
Jouni Malinen [Fri, 1 Nov 2013 10:31:26 +0000 (12:31 +0200)] 
AOSP: Customized STA reconnection behavior

This is rebased version of this AOSP commit:

commit 7db4ef75f0190d98dbc84f8968ede3ac0ae29571
Author: Irfan Sheriff <isheriff@google.com>
Date:   Mon Jun 18 09:39:07 2012 -0700

    Restore STA reconnection behavior

    Have the customized retry behavior only for P2P & do group failure indicatio
    beyond 5 retries

    Bug: 6674338
    Change-Id: I58cba356ebdb7fc4eaa9bedfa417b7d5d35bb306

11 years agoAOSP: Some SD changes
Jouni Malinen [Fri, 1 Nov 2013 10:28:09 +0000 (12:28 +0200)] 
AOSP: Some SD changes

These came hidden in the following AOSP commit. The changes are not from
upstream.

commit 04949598a23f501be6eec21697465fd46a28840a
Author: Dmitry Shmidt <dimitrysh@google.com>
Date:   Thu Jul 19 12:16:46 2012 -0700

    wpa_supplicant: Update to 07-Jul-2012 TOT

    commit a5ed45586c63ffd8f9d2b44e27c251d7bacbeaf4
    Author: Jouni Malinen <j@w1.fi>
    Date:   Sat Jul 7 13:01:45 2012 +0300

        WPS SSDP: Fix socket leaks on error paths

    Change-Id: I0864aac7fc88fa2a60f5cca7d524b94363410c85
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
11 years agoAOSP: Some P2P connection-in-progress changes
Jouni Malinen [Fri, 1 Nov 2013 10:21:43 +0000 (12:21 +0200)] 
AOSP: Some P2P connection-in-progress changes

The p2p_search_pending() function is not used anywhere. That part should
be reverted.

These came in as part of this AOSP commit:

commit 2fb777c379ad560c309c54b96c2c13291da23f54
Author: Dmitry Shmidt <dimitrysh@google.com>
Date:   Wed May 2 12:29:53 2012 -0700

    wpa_supplicant: Update to Version 0.8.26 from BRCM

    - Add interface command
    - Improve scan handling during P2P

    BUG: b/6324527, b/6427094

    Change-Id: I4425f44d2a15de0725ba4a1b42cc56e10954b314
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
11 years agoAOSP: Unused p2p_search_in_progress()
Jouni Malinen [Fri, 1 Nov 2013 10:20:31 +0000 (12:20 +0200)] 
AOSP: Unused p2p_search_in_progress()

This came as part of the following AOSP commit, but the function is
not used anywhere. This should be reverted.

commit 1f69aa52ea2e0a73ac502565df8c666ee49cab6a
Author: Dmitry Shmidt <dimitrysh@google.com>
Date:   Tue Jan 24 16:10:04 2012 -0800

    Update to new version 0.8.16 from BRCM

    Sync with main tree commit b8349523e460493fa0b4de36c689595109e45e91
    Author: Neeraj Kumar Garg <neerajkg@broadcom.com>
    Date:   Tue Dec 27 23:21:45 2011 +0200
        P2P: Reject p2p_group_add if forced frequency is not acceptable

    Change-Id: Icb4541a371b05c270e80440d7a7fdea7f33ff61e
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
11 years agoAOSP: P2P GO Neg oper_freq update from GO Neg Confirm
Jouni Malinen [Fri, 1 Nov 2013 10:13:58 +0000 (12:13 +0200)] 
AOSP: P2P GO Neg oper_freq update from GO Neg Confirm

11 years agoAOSP: Unidentified hostapd/Android.mk change
Jouni Malinen [Fri, 1 Nov 2013 10:11:14 +0000 (12:11 +0200)] 
AOSP: Unidentified hostapd/Android.mk change

This came as part of the following AOSP commit, but was not in upstream
at the time:

commit 391c59f0632df8db1c325da1d31d479b2eedce45
Author: Dmitry Shmidt <dimitrysh@google.com>
Date:   Tue Sep 3 12:16:28 2013 -0700

    Cumulative patch from commit b2b688d18d40cd667d0faa149b4a7172166b3bd4

    b2b688d P2P: Fix crash when failed to create GO interface
    6197169 WPS NFC: Fix build without CONFIG_AP=y
    e1ae5d7 SAE: Fix build without CONFIG_AP=y
    813e7b3 P2P: Remove group from timeout on PSK failure
    5bf9a6c P2P: Add event messages for possible PSK failures on P2P groups
    eac8dab P2P: Document per-client keys and p2p_remove_client
    43c693c P2P: Do not store duplicate PSK entries for the same device
    f2c5660 P2P: Add a command for removing a client from all groups
    01a57fe P2P: Maintain list of per-client PSKs for persistent groups
    759fd76 P2P: Select PSK based on Device Address instead of Interface Address
    94ddef3 P2P: Make peer's P2P Device Address available to authenticator
    52177fb P2P: Store P2P Device Address in per-device PSK records
    05766ed P2P: Allow per-device PSK to be assigned
    698e921 wpa_cli: Add tab completion for p2p_set field values
    0b5fb86 P2P: Stop listen state when listen-only duration is over
    02a3e5c wpa_cli: Allow first DISCONNECTED event to be reported
    cdf8bfa Disallow WEP configuration in WPA network
    731ef43 D-Bus: Fix per-iface object unregistration on not existing objects
    447969e D-Bus: Do not send network notification for all P2P groups
    eb32460 Fix switching from EAP-SIM to EAP-AKA/AKA'
    f2b3f4d P2P: Allow P2P functionality to be disabled per interface
    50f4f2a hostapd: Add Automatic Channel Selection (ACS) support
    43ee470 P2P: Immediate group removal in GC in case of deauthentication
    fcf2052 Fix MNC length for Swisscom SIM cards

    Bug: 1060622810513949

    Change-Id: I63ba0e2ab4fa76e6afa7a34be42e8e847e1511b0
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
11 years agoAOSP: Unidentified hostapd/Android.mk change
Jouni Malinen [Fri, 1 Nov 2013 10:09:10 +0000 (12:09 +0200)] 
AOSP: Unidentified hostapd/Android.mk change

This was in the following AOSP commit, but the outcome differs from the
upstream repository of that time.

commit 61d9df3e62aaa0e87ad05452fcb95142159a17b6
Author: Dmitry Shmidt <dimitrysh@google.com>
Date:   Wed Aug 29 16:22:06 2012 -0700

    wpa_supplicant: Update to 29-Aug-2012 TOT

    commit 6ffdc2f7bd496ace7a46e055f9714e7db4b1f722
    Author: Jouni Malinen <jouni@qca.qualcomm.com>
    Date:   Fri Mar 2 22:31:04 2012 +0200

        WFD: Add preliminary WSD request processing and response

        This commit does not yet address support for different device roles,
        i.e., the same set of subelements are returned regardless of which
        role was indicated in the request.

        Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

    Change-Id: I9d63acce719b982c02e589bb59602382e82988c8
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
11 years agoRemove obsolete keystore path
Kenny Root [Wed, 26 Jun 2013 21:57:31 +0000 (14:57 -0700)] 
Remove obsolete keystore path

It's not possible to get a raw private key from keystore anymore, so
this would fail every time anyway. Remove it so it doesn't confuse
anyone that looks at this code.

Change-Id: I021fc1707b16474d8698c85055a6fcc4095cd215

11 years agoUse keystore ENGINE for private key operations
Kenny Root [Wed, 21 Mar 2012 00:00:47 +0000 (17:00 -0700)] 
Use keystore ENGINE for private key operations

The new keystore ENGINE is usable to perform private key operations when
we can't get the actual private key data. This is the case when hardware
crypto is enabled: the private key never leaves the hardware.

Subsequently, we need to be able to talk to OpenSSL ENGINEs that aren't
PKCS#11 or OpenSC. This just changes a few #define variables to allow us
to talk to our keystore engine without having one of those enabled and
without using a PIN.

Change-Id: Iabab5077c3d167a1e13bc8ef8745dc59ad4d62f7

11 years agoAOSP: nl80211 use_monitor hack
Jouni Malinen [Fri, 1 Nov 2013 09:58:52 +0000 (11:58 +0200)] 
AOSP: nl80211 use_monitor hack

This was somehow hidden in this AOSP commit (it was not from the
upstream repository..):

commit 04949598a23f501be6eec21697465fd46a28840a
Author: Dmitry Shmidt <dimitrysh@google.com>
Date:   Thu Jul 19 12:16:46 2012 -0700

    wpa_supplicant: Update to 07-Jul-2012 TOT

    commit a5ed45586c63ffd8f9d2b44e27c251d7bacbeaf4
    Author: Jouni Malinen <j@w1.fi>
    Date:   Sat Jul 7 13:01:45 2012 +0300

        WPS SSDP: Fix socket leaks on error paths

    Change-Id: I0864aac7fc88fa2a60f5cca7d524b94363410c85
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
11 years agoAOSP: P2P SD changes
Jouni Malinen [Fri, 1 Nov 2013 09:55:58 +0000 (11:55 +0200)] 
AOSP: P2P SD changes

This is rebased version (with couple of changes removed) of this AOSP
commit:

From f44b9c4a18d17fbd39901f76a014c32006570fb8 Mon Sep 17 00:00:00 2001
From: Irfan Sheriff <isheriff@google.com>
Date: Wed, 13 Jun 2012 11:09:23 -0700
Subject: [PATCH] Fix p2p service discovery

- Fix listen timing to improve SD reliability
- Fix SD packet scheduling

Bug: 6629112
Change-Id: I01365279439116256372d019bdbfd4b2113bf2ce

11 years agoAOSP: wps_registrar.c PBC address hack of some sort
Jouni Malinen [Fri, 1 Nov 2013 09:48:13 +0000 (11:48 +0200)] 
AOSP: wps_registrar.c PBC address hack of some sort

This is a part from this AOSP commit:

commit 98f9e76624da6bb96edc1982c423e4a119c5170a
Author: Dmitry Shmidt <dimitrysh@google.com>
Date:   Wed May 30 11:18:46 2012 -0700

    wpa_supplicant: Update to Version 0.8.27 from BRCM

    - Fix crash during TRUE pbc overlap
    - Fix p2p_stop_find event
    - Avoid race condition in GO-NEG process if both peers enter
      p2p_connect at the same time
    - Retry assoc immediately on ASSOC-REJECT. Previously assoc was
      retried on authentication timeout (which occurs after 10secs).
      Now on assoc reject, we cancel the auth timer and then initiate
      a assoc scan.

    BUG: 65437056427094

    Change-Id: I4489fb14b6cead069f0d14fcbb9e2224f790d77b
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
11 years agowpa_supplicant_8: use correct header file.
Nick Kralevich [Thu, 28 Feb 2013 21:55:41 +0000 (13:55 -0800)] 
wpa_supplicant_8: use correct header file.

Change-Id: I168ac70cc03d0dd31af77906d71b8b1f77752501

11 years agoAOSP: driver_nl80211.c private library
Jouni Malinen [Fri, 1 Nov 2013 09:45:23 +0000 (11:45 +0200)] 
AOSP: driver_nl80211.c private library

11 years agoSwitch keystore to binder
Kenny Root [Tue, 13 Nov 2012 00:33:36 +0000 (16:33 -0800)] 
Switch keystore to binder

Change-Id: Idfcff5f2799863075160cc6c2565f2fe774c2552

11 years agoUse SSL_OP_NO_TLSv1_1 SSL_OP_NO_TLSv1_2 SSL_OP_NO_TICKET for better wpa_supplicant_8...
Brian Carlstrom [Thu, 26 Jul 2012 06:11:44 +0000 (23:11 -0700)] 
Use SSL_OP_NO_TLSv1_1 SSL_OP_NO_TLSv1_2 SSL_OP_NO_TICKET for better wpa_supplicant_8 interoperability

Bug: https://bugs.launchpad.net/ubuntu/+source/wpasupplicant/+bug/969343/comments/72
Bug: http://w1.fi/bugz/show_bug.cgi?id=447#c7
Bug: http://code.google.com/p/android/issues/detail?id=34212
Bug: 6883259
Change-Id: Ib53326cc8cd40e800454b7b92586c052bc910ba8

11 years agoAOSP: Skip ieee802_1x_finished disconnect on auth failure
Jouni Malinen [Fri, 1 Nov 2013 09:34:57 +0000 (11:34 +0200)] 
AOSP: Skip ieee802_1x_finished disconnect on auth failure

This is part of the following AOSP commit:

commit ad266fb3da6083126e7619e525153839b918aa44
Author: Dmitry Shmidt <dimitrysh@google.com>
Date:   Fri Aug 24 17:03:35 2012 -0700

    wpa_supplicant: Update to BRCM version 0.8.0-37

    - Allow AP_SME support
    - Do not send disassoc after EAP failure since AP_SME is enabled
      and del_station will be called
    - Allow group idle timeout to run during WPS disconnect

    Change-Id: I7e9e15b9c44804196bc98c01d51a71e24412b91d
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
11 years agoAOSP: driver_cmd
Jouni Malinen [Fri, 1 Nov 2013 09:30:24 +0000 (11:30 +0200)] 
AOSP: driver_cmd

11 years agoAOSP: P2P frequency conflict
Jouni Malinen [Fri, 1 Nov 2013 09:21:28 +0000 (11:21 +0200)] 
AOSP: P2P frequency conflict

11 years agoRevert "Android: Add PMF support to hostapd build"
Jouni Malinen [Fri, 1 Nov 2013 09:17:46 +0000 (11:17 +0200)] 
Revert "Android: Add PMF support to hostapd build"

This reverts commit 962b8b36e67d8cfe20528d37e4bb2b366aaf24f0.

Looks like this was not pulled into AOSP.

11 years agoAOSP: gitignore
Jouni Malinen [Fri, 1 Nov 2013 09:15:25 +0000 (11:15 +0200)] 
AOSP: gitignore

11 years agoAOSP: Android: Add src directory symlinks
Dmitry Shmidt [Tue, 15 Nov 2011 14:00:34 +0000 (16:00 +0200)] 
AOSP: Android: Add src directory symlinks

These are from Android wpa_supplicant_8.git initial 0.8.X commit
8d520ff1dc2da35cdca849e982051b86468016d8.

Change-Id: I26aec5afbbd4f4a1f5fd900912545b6f5050de64
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
(cherry picked from commit 05d4c3aec6024ed308d640d68f91ab4e926fd79d)

11 years agoAOSP: Add CleanSpec.mk
Jouni Malinen [Fri, 1 Nov 2013 09:11:11 +0000 (11:11 +0200)] 
AOSP: Add CleanSpec.mk

This is a snapshot from AOSP commit
51b6ea882f234c14cd1fe1332a3840cf61fafcca.

11 years agoAOSP: Android: Add MODULE_LICENSE_BSD_LIKE
Dmitry Shmidt [Tue, 15 Nov 2011 13:58:56 +0000 (15:58 +0200)] 
AOSP: Android: Add MODULE_LICENSE_BSD_LIKE

These are from Android wpa_supplicant_8.git initial 0.8.X commit
8d520ff1dc2da35cdca849e982051b86468016d8.

Change-Id: I26aec5afbbd4f4a1f5fd900912545b6f5050de64
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
(cherry picked from commit a6df7575b64ef902ae27d17769a3cf7e6056a975)

11 years agoP2P: Fix crash when failed to create GO interface aosp-kk-from-upstream
Vinay Krishna Eranna [Tue, 3 Sep 2013 08:17:21 +0000 (11:17 +0300)] 
P2P: Fix crash when failed to create GO interface

wpa_supplicant crashes if driver configuration for AP mode interface
configuration fails after group negotiation. This is because of a
regression from commit 1075b2957169d8f9d6dddd7679339c751dc9515b that
ends up freeing the wpa_s instance from within
wpa_supplicant_create_ap() without the caller knowing.

Fix this by using an eloop timeout to free remove the P2P group so that
wpa_supplicant_create_ap() and especially wpa_supplicant_associate()
callers do not need to know about interface getting possibly removed. In
addition, move the P2P specific code into p2p_supplicant.c where it
really belongs. This allows the already existing group formation timeout
to be used by reducing the timeout to zero.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

11 years agotests: Check wpa_supplicant connection after reset
Jouni Malinen [Tue, 3 Sep 2013 09:13:25 +0000 (12:13 +0300)] 
tests: Check wpa_supplicant connection after reset

Some test runs have resulted in wpa_supplicant being unresponsive or
very slow on the control interface. Check for that type of issues as
part of the reset sequence that is done between each test case.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

11 years agoWPS NFC: Fix build without CONFIG_AP=y
Jouni Malinen [Tue, 3 Sep 2013 08:27:24 +0000 (11:27 +0300)] 
WPS NFC: Fix build without CONFIG_AP=y

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

11 years agoSAE: Fix build without CONFIG_AP=y
Jouni Malinen [Tue, 3 Sep 2013 08:25:29 +0000 (11:25 +0300)] 
SAE: Fix build without CONFIG_AP=y

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

11 years agoP2P: Remove group from timeout on PSK failure
Jouni Malinen [Mon, 2 Sep 2013 13:33:42 +0000 (16:33 +0300)] 
P2P: Remove group from timeout on PSK failure

Avoid potential issues with removing a P2P group on PSK failure directly
from the wpa_supplicant_event() call since the caller (in driver_*.c)
may not be prepared for the interface disappearing at that point in
time.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

11 years agotests: Add a test case for invitation after client removal
Jouni Malinen [Sun, 1 Sep 2013 17:47:37 +0000 (20:47 +0300)] 
tests: Add a test case for invitation after client removal

test_persistent_group_invite_removed_client verifies that a client
that is removed from a group can rejoin based on new invitation.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agotests: Use a helper function for waiting session termination
Jouni Malinen [Sun, 1 Sep 2013 16:30:08 +0000 (19:30 +0300)] 
tests: Use a helper function for waiting session termination

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agotests: Add test cases for persistent P2P groups
Jouni Malinen [Sun, 1 Sep 2013 16:24:12 +0000 (19:24 +0300)] 
tests: Add test cases for persistent P2P groups

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agotests: Extend test_autogo_2cli to test client removal
Jouni Malinen [Sun, 1 Sep 2013 14:58:17 +0000 (17:58 +0300)] 
tests: Extend test_autogo_2cli to test client removal

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agotests: Add test cases for per-STA PSK in P2P group
Jouni Malinen [Sun, 1 Sep 2013 08:56:55 +0000 (11:56 +0300)] 
tests: Add test cases for per-STA PSK in P2P group

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agoP2P: Add event messages for possible PSK failures on P2P groups
Jouni Malinen [Sun, 1 Sep 2013 18:28:16 +0000 (21:28 +0300)] 
P2P: Add event messages for possible PSK failures on P2P groups

It is possible for the GO of a persistent group to change the PSK or
remove a client when per-client PSKs are used and this can happen
without the SSID changing (i.e., the group is still valid, but just not
for a specific client). If the client side of such persistent group ends
up trying to use an invalidated persistent group information, the
connection will fail in 4-way handshake. A new WPS provisioning step is
needed to recover from this.

Detect this type of case based on two 4-way handshake failures when
acting as a P2P client in a persistent group. A new
"P2P-PERSISTENT-PSK-FAIL id=<persistent group id>" event is used to
indicate when this happens. This makes it easier for upper layers to
remove the persistent group information with "REMOVE_NETWORK <persistent
group id>" if desired (e.g., based on user confirmation).

In addition to indicating the error cases for persistent groups, all
this type of PSK failures end up in the client removing the group with
the new reason=PSK_FAILURE information in the P2P-GROUP-REMOVED event.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agoP2P: Document per-client keys and p2p_remove_client
Jouni Malinen [Sun, 1 Sep 2013 14:54:10 +0000 (17:54 +0300)] 
P2P: Document per-client keys and p2p_remove_client

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agoP2P: Do not store duplicate PSK entries for the same device
Jouni Malinen [Sun, 1 Sep 2013 14:47:05 +0000 (17:47 +0300)] 
P2P: Do not store duplicate PSK entries for the same device

If a client joins a P2P group multiple times, replace the previous
per-client PSK entry instead of adding a new entry each time.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agoP2P: Add a command for removing a client from all groups
Jouni Malinen [Sun, 1 Sep 2013 14:37:22 +0000 (17:37 +0300)] 
P2P: Add a command for removing a client from all groups

The new control interface command P2P_REMOVE_CLIENT <P2P Device
Address|iface=Address> can now be used to remove the specified client
from all groups (ongoing and persistent) in which the local device is a
GO. This will remove any per-client PSK entries and deauthenticate the
device.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agoP2P: Maintain list of per-client PSKs for persistent groups
Jouni Malinen [Sun, 1 Sep 2013 10:40:33 +0000 (13:40 +0300)] 
P2P: Maintain list of per-client PSKs for persistent groups

Record all generated per-client PSKs in the persistent group network
block and configure these for the GO Authenticator whenever re-starting
the persistent group. This completes per-client PSK support for
persistent groups.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agoP2P: Select PSK based on Device Address instead of Interface Address
Jouni Malinen [Sun, 1 Sep 2013 08:30:26 +0000 (11:30 +0300)] 
P2P: Select PSK based on Device Address instead of Interface Address

When using per-device PSKs, select the PSK based on the P2P Device
Address of the connecting client if that client is a P2P Device. This
allows the P2P Interface Address to be changed between P2P group
connections which may happen especially when using persistent groups.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agoP2P: Make peer's P2P Device Address available to authenticator
Jouni Malinen [Sun, 1 Sep 2013 08:05:19 +0000 (11:05 +0300)] 
P2P: Make peer's P2P Device Address available to authenticator

This can be used to implement per-device PSK selection based on the
peer's P2P Device Address instead of P2P Interface Address.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agoP2P: Store P2P Device Address in per-device PSK records
Jouni Malinen [Sun, 1 Sep 2013 07:47:34 +0000 (10:47 +0300)] 
P2P: Store P2P Device Address in per-device PSK records

This makes the P2P Device Address of the Enrollee available with the PSK
records to allow P2P Device Address instead of P2P Interface Address to
be used for finding the correct PSK.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agoP2P: Allow per-device PSK to be assigned
Jouni Malinen [Sun, 1 Sep 2013 07:08:30 +0000 (10:08 +0300)] 
P2P: Allow per-device PSK to be assigned

"wpa_cli p2p_set per_sta_psk <0/1>" can now be used to disable/enable
use of per-device PSKs in P2P groups. This is disabled by default.
When enabled, a default passphrase is still generated by the GO for
legacy stations, but all P2P and non-P2P devices using WPS will get
a unique PSK.

This gives more protection for the P2P group by preventing clients from
being able to derive the unicast keys used by other clients. This is
also a step towards allowing specific clients to be removed from a group
reliably without having to tear down the full group to do so.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agowpa_cli: Add tab completion for p2p_set field values
Jouni Malinen [Sat, 31 Aug 2013 17:58:35 +0000 (20:58 +0300)] 
wpa_cli: Add tab completion for p2p_set field values

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agoP2P: Stop listen state when listen-only duration is over
Syed Asifful Dayyan Rafiuddeen [Sat, 31 Aug 2013 15:09:15 +0000 (18:09 +0300)] 
P2P: Stop listen state when listen-only duration is over

Even after listen duration is over, P2P module remained in
P2P_LISTEN_ONLY state, which is blocking station mode scans. Fix this by
stopping P2P listen explicitly to update p2p_state to IDLE when listen
duration expires.

Signed-hostap: Syed Asifful Dayyan <syedd@broadcom.com>

11 years agotests: Make test_autogo validate group removal event on client
Jouni Malinen [Sat, 31 Aug 2013 14:59:16 +0000 (17:59 +0300)] 
tests: Make test_autogo validate group removal event on client

Use test_autogo to verify that P2P client is able to notice explicit
group session termination message from the GO. This would have caught
the regression in processing P2P deauthentication notifications.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agowpa_cli: Allow first DISCONNECTED event to be reported
Jouni Malinen [Sat, 31 Aug 2013 14:27:20 +0000 (17:27 +0300)] 
wpa_cli: Allow first DISCONNECTED event to be reported

wpa_cli filters out extra DISCONNECTED events from action scripts. This
ended up filtering out the first real DISCONNECT event in case wpa_cli
was started when wpa_supplicant was in connected state. Change wpa_cli
to allow the first disconnection event to be reported to the action
script in such case.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agoDisallow WEP configuration in WPA network
Jouni Malinen [Sat, 31 Aug 2013 14:18:45 +0000 (17:18 +0300)] 
Disallow WEP configuration in WPA network

Some drivers fail to work if WEP keys are configured in a WPA network.
To avoid potentially confusing error cases, reject hostapd configuration
that enables WPA and includes parameters that would imply that WEP keys
would be set.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agoD-Bus: Fix per-iface object unregistration on not existing objects
Jouni Malinen [Sat, 31 Aug 2013 13:46:24 +0000 (16:46 +0300)] 
D-Bus: Fix per-iface object unregistration on not existing objects

If the private data for an object is not found, do not try to unregister
that object to avoid D-Bus errors.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agoD-Bus: Do not send network notification for all P2P groups
Jouni Malinen [Sat, 31 Aug 2013 13:44:42 +0000 (16:44 +0300)] 
D-Bus: Do not send network notification for all P2P groups

Previously, network added event was skipping during group formation.
However, this did not necessarily catch all cases of temporary P2P
network blocks. Check ssid->p2p_group to make this behavior more
consistent by avoiding all P2P groups.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agoFix switching from EAP-SIM to EAP-AKA/AKA'
Masashi Honma [Sat, 31 Aug 2013 13:11:48 +0000 (16:11 +0300)] 
Fix switching from EAP-SIM to EAP-AKA/AKA'

Switching EAP method from EAP-SIM to EAP-AKA fails.
wpa_cli commands are below.

------------------
sudo wpa_cli add_network
sudo wpa_cli set_network 0 ssid '"eap-sim"'
sudo wpa_cli set_network 0 key_mgmt WPA-EAP
sudo wpa_cli set_network 0 eap SIM
sudo wpa_cli set_network 0 pin '"1234"'
sudo wpa_cli set_network 0 pcsc '""'
sudo wpa_cli select_network 0

sudo wpa_cli disable_network 0
sudo wpa_cli disconnect
sudo wpa_cli remove_network 0

sudo wpa_cli add_network
sudo wpa_cli set_network 0 ssid '"eap-sim"'
sudo wpa_cli set_network 0 key_mgmt WPA-EAP
sudo wpa_cli set_network 0 eap AKA
sudo wpa_cli set_network 0 pin '"1234"'
sudo wpa_cli set_network 0 pcsc '""'
sudo wpa_cli select_network 0
------------------

Then EAP-AKA connection resulted in fail.
wpa_supplicant log is below.

------------------
wlan0: CTRL-EVENT-EAP-METHOD EAP vendor 0 method 23 (AKA) selected
SCARD: Non-USIM card - cannot do UMTS auth
EAP-AKA: UMTS authentication failed (AUTN)
wlan0: CTRL-EVENT-EAP-FAILURE EAP authentication failed
------------------

This occurs because on the first EAP-SIM authentication, the SIM/USIM
card in the device was recognized as SIM card even if it is USIM card.

So this patch changes it to recognize as USIM card even if EAP-SIM
authentication was required.

I have tested these switching cases.
EAP-SIM -> EAP-AKA
EAP-SIM -> EAP-AKA'
EAP-AKA -> EAP-SIM
EAP-AKA -> EAP-AKA'
EAP-AKA' -> EAP-SIM
EAP-AKA' -> EAP-AKA

Signed-hostap: Masashi Honma <masashi.honma@gmail.com>

11 years agoP2P: Allow P2P functionality to be disabled per interface
Sreenath Sharma [Sat, 31 Aug 2013 08:59:05 +0000 (11:59 +0300)] 
P2P: Allow P2P functionality to be disabled per interface

By default, P2P is initialized for all driver interfaces and this makes
P2P getting initialized for non-P2P station interface if the supplicant
is started first on this interface. If an interface is dedicated for
non-P2P station mode, it is now possible to disable P2P initialization
by adding 'p2p_disabled=1' in the configuration file of non-P2P station
interface, irrespective of the order in which supplicant is started.

Signed-hostap: Sreenath Sharma <sreenats@broadcom.com>

11 years agotests: Use longer timeout in test_ap_wps_er_add_enrollee
Jouni Malinen [Sat, 31 Aug 2013 08:54:23 +0000 (11:54 +0300)] 
tests: Use longer timeout in test_ap_wps_er_add_enrollee

This is another one of the test cases that can time out frequently
under valgrind during WPS exchange. Increase the timeout to make
false error reports less likely to occur.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agohostapd: Add Automatic Channel Selection (ACS) support
Michal Kazior [Sat, 31 Aug 2013 08:49:51 +0000 (11:49 +0300)] 
hostapd: Add Automatic Channel Selection (ACS) support

This adds ACS support to hostapd. Currently only survey-based
algorithm is available.

To use ACS you need to enable CONFIG_ACS=y in .config and use
channel=0 (or channel=acs_survey) in hostapd.conf.

For more details see wiki page [1] or comments in src/ap/acs.c.

[1]: http://wireless.kernel.org/en/users/Documentation/acs

Signed-hostap: Michal Kazior <michal.kazior@tieto.com>

11 years agoP2P: Immediate group removal in GC in case of deauthentication
Sreenath Sharma [Sat, 31 Aug 2013 08:11:41 +0000 (11:11 +0300)] 
P2P: Immediate group removal in GC in case of deauthentication

Right now in case of deauthentication from GO, immediate group removal will
happen in GC only if the deauthentication packet has a valid IE. However,
the IE in deauthentication packet is mandated only for managed P2P group.
So in normal P2P group the group removal is delayed and will happen later
only in group idle timeout.

This fixes a regression from commit
d7df0fa727a2a79d7b22df6c68961220349ab2e3 that changed the previous check
for data->deauth_info != NULL to data->deauth_info->ie != NULL.

Signed-hostap: Sreenath Sharma <sreenats@broadcom.com>

11 years agoFix MNC length for Swisscom SIM cards
Andrejs Cainikovs [Sat, 31 Aug 2013 07:58:23 +0000 (10:58 +0300)] 
Fix MNC length for Swisscom SIM cards

Swisscom SIM cards do not include MNC length within EF_AD, and end up
using incorrect MNC length based on the 3-digit default. Hardcode MNC
length of 2 for Switzerland, in the same manner as it was done for
Finland.

Signed-hostap: Andrejs Cainikovs <andrejs.cainikovs@sonymobile.com>

11 years agotests: Increase WPS timeout to 30 seconds
Jouni Malinen [Sat, 31 Aug 2013 07:45:03 +0000 (10:45 +0300)] 
tests: Increase WPS timeout to 30 seconds

Number of crypto operations seem to take very long time in the valgrind
tests (about five seconds for public key generation for M1 and M2 on a
virtual server) and this is enough to push the test runs to hit the
timeout frequently even when there is no real error. Make this less
frequent by increasing WPS test case timeout from 15 to 30 seconds to
avoid issues based on the test scripts.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agotests: Increase P2P group formation timeout to 20 seconds
Jouni Malinen [Sat, 31 Aug 2013 07:33:44 +0000 (10:33 +0300)] 
tests: Increase P2P group formation timeout to 20 seconds

Number of crypto operations seem to take very long time in the valgrind
tests (about five seconds for passphrase to PSK mapping and for public
key generation for M1 and M2 on a virtual server) and this is enough to
push the test runs to hit the timeout frequently even when there is no
real error. Make this less frequent by increasing group formation
timeout from 15 to 20 seconds to avoid issues based on the test scripts
(15 + config time seconds timeout in the protocol may still kick in,
though).

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agoIBSS RSN: Add a timeout for Authentication frame exchange
Jouni Malinen [Tue, 27 Aug 2013 13:26:33 +0000 (16:26 +0300)] 
IBSS RSN: Add a timeout for Authentication frame exchange

It is possible for the peer device not to support Authentication frame
exchange even though this would be required functionality in the
standard. Furthermore, either Authentication frame may be lost. To
recover from cases where Authentication frame sequence 2 is not
received, start EAPOL Authenticator from one second timeout.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agotests: Wait longer for program deinit
Jouni Malinen [Tue, 27 Aug 2013 13:02:15 +0000 (16:02 +0300)] 
tests: Wait longer for program deinit

Wait a bit longer for wpa_supplicant/hostapd to exit and clear control
interface files separately if either any of the cleanup steps fail to do
so.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agotests: Wait for hostapd/wpa_supplicant to reply at start (concurrent)
Jouni Malinen [Tue, 27 Aug 2013 13:01:04 +0000 (16:01 +0300)] 
tests: Wait for hostapd/wpa_supplicant to reply at start (concurrent)

Instead of waiting for a fixed duration, poll hostapd/wpa_supplicant
through the control interface until they are ready to reply in order to
avoid starting test case execution too early. This is like commit
b76579e0c09a1a763b70d63613377b407cbc405f but for the concurrent P2P test
cases that were forgotten from that commit.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agoP2P: Postpone concurrent scans when waiting for first client as GO
Jouni Malinen [Tue, 27 Aug 2013 09:23:10 +0000 (12:23 +0300)] 
P2P: Postpone concurrent scans when waiting for first client as GO

Previously, concurrent station mode scans were postponed during an
ongoing P2P group formation up to the point of completed WPS
provisioning step. This would allow a scan to be started before the P2P
client has completed association for the data connection if a scan
request were timed to hit the window between the provisioning step and
the following association. Avoid this by extending P2P-in-progress state
to continue until the first data connection has been completed as part
of group formation. Use a ten second timeout for this to avoid leaving
scans disabled indefinitely if the client fails to connect completely.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

11 years agotests: Detect BSSID mismatch in test_ibss_rsn
Jouni Malinen [Tue, 27 Aug 2013 00:11:02 +0000 (03:11 +0300)] 
tests: Detect BSSID mismatch in test_ibss_rsn

It looks like mac80211 does not always manage to join the same IBSS and
this can result in test_ibss_rsn failures. Detect this case and try to
get the IBSSes to merge by running a scan prior to continuing with the
test case.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agoIBSS RSN: Work around Data RX vs. Authentication RX race condition
Jouni Malinen [Mon, 26 Aug 2013 23:54:35 +0000 (02:54 +0300)] 
IBSS RSN: Work around Data RX vs. Authentication RX race condition

It is possible for the driver to report EAPOL frame RX before
Authentication frame RX even if the frames arrived in the opposite
order. This can result in issues in cases where both IBSS peers initiate
Authentication frame exchange at about the same time and one of the
EAPOL sessions is started before processing Authentication frame seq=1
RX. Work around this by not re-initializing EAPOL state on
Authentication (SEQ=1) RX if own Authentication frame was transmitted
within last 500 ms.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agotests: Wait for all 4-way handshake pairs in test_ibss_rsn
Jouni Malinen [Mon, 26 Aug 2013 23:00:39 +0000 (02:00 +0300)] 
tests: Wait for all 4-way handshake pairs in test_ibss_rsn

The handshake between STA2 and STA1 was not tracked previously. For
completeness, include that in the list of handshakes that are explicitly
waited for to complete prior to starting the connectivity tests. Since
all key setup should be done at this point, remove the extra wait before
the last connectivity test between STA1 and STA2.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agotests: Increase test_ap_wps_init connection timeout
Jouni Malinen [Mon, 26 Aug 2013 13:54:05 +0000 (16:54 +0300)] 
tests: Increase test_ap_wps_init connection timeout

It looks like there may not be enough time to complete this test case in
15 seconds under valgrind on a virtual host every time, so increase the
timeout to 30 seconds to get more consistent test results.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agotests: Wait for hostapd/wpa_supplicant to reply at start
Jouni Malinen [Mon, 26 Aug 2013 13:47:15 +0000 (16:47 +0300)] 
tests: Wait for hostapd/wpa_supplicant to reply at start

Instead of waiting for a fixed duration, poll hostapd/wpa_supplicant
through the control interface until they are ready to reply in order to
avoid starting test case execution too early.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agotests: Kill hostapd/wpa_supplicant more forcefully if needed
Jouni Malinen [Mon, 26 Aug 2013 13:38:13 +0000 (16:38 +0300)] 
tests: Kill hostapd/wpa_supplicant more forcefully if needed

Try to make sure new testing can be started by forcing
hostapd/wpa_supplicant to be killed with SIGKILL if needed. In addition,
wait a bit longer when killing the processes to avoid issues with the
next test run starting before the old one has been fully terminated.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agoP2P: Update peer operating channel from GO Negotiation Confirm
Jouni Malinen [Mon, 26 Aug 2013 11:16:31 +0000 (14:16 +0300)] 
P2P: Update peer operating channel from GO Negotiation Confirm

If the device that sends the GO Negotiation Confirm becomes the GO, it
may change its operating channel preference between GO Negotiation
Request and Confirm messages based on the channel list received from us.
Previously, the peer operating channel preference was not updated in
such a case and this could result in the initial scans after GO
Negotiation using incorrect operating channel and as such, extra delay
in the connection process. Fix this by updating the operating channel
information from GO Negotiation Confirm in cases where the peer becomes
the GO.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

11 years agoP2P: Use the first pref_chan entry as operating channel preference
Jouni Malinen [Mon, 26 Aug 2013 11:10:23 +0000 (14:10 +0300)] 
P2P: Use the first pref_chan entry as operating channel preference

If there are no higher priority preference for the operating channel,
use the first pref_chan entry as the operating channel preference over
the pre-configured channel which is not really a good indication of
preference. This changes the behavior for GO Negotiation Request frame
operating channel preference value in cases where p2p_pref_chan list is
set.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

11 years agoP2P: Add more debug info on operating channel selection
Jouni Malinen [Mon, 26 Aug 2013 11:08:03 +0000 (14:08 +0300)] 
P2P: Add more debug info on operating channel selection

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

11 years agoP2P: Add GO negotiation results into the P2P-GO-NEG-SUCCESS event
Jouni Malinen [Mon, 26 Aug 2013 10:35:44 +0000 (13:35 +0300)] 
P2P: Add GO negotiation results into the P2P-GO-NEG-SUCCESS event

This provides status information about the negotiated group to
wpa_supplicant control interface monitors during group formation in a
form that is easier to use than having to fetch the information
separately.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

11 years agoReplace perror() with wpa_printf(strerror) in ctrl_iface calls
Jouni Malinen [Mon, 26 Aug 2013 08:46:21 +0000 (11:46 +0300)] 
Replace perror() with wpa_printf(strerror) in ctrl_iface calls

This replaces number of perror() calls with wpa_printf() to get the
error messages embedded within rest of the debug messages in the same
stream instead of pushing these to stderr which may get directed to
another location.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agotests: Stop valgrind.bin regardless of which option is started
Jouni Malinen [Mon, 26 Aug 2013 08:28:32 +0000 (11:28 +0300)] 
tests: Stop valgrind.bin regardless of which option is started

The previous design of having to provide valgrind parameter to
stop-wifi.sh did not work since the new test setup may no match the
previous one. Instead of trying to figure out what needs to be stopped
based on previous run, stop all wpa_supplicant/hostapd processes running
under valgrind unconditionally to avoid cases where new set of processes
cannot be started due to existing processed.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agotests: Use more enforced order for the RSN IBSS steps
Jouni Malinen [Sun, 25 Aug 2013 20:10:37 +0000 (23:10 +0300)] 
tests: Use more enforced order for the RSN IBSS steps

test_ibss_rsn has been failing pretty frequently due to various issues
in getting all connections up. Try to address this initially by avoiding
concurrent operations and explicitly waiting for 4-way handshake
completion before testing data connection. Once this test case is
workign more robustly, a more difficult case with concurrent operations
can be added as a separate test case.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agoIBSS RSN: Add IBSS-RSN-COMPLETED event message
Jouni Malinen [Sun, 25 Aug 2013 20:09:22 +0000 (23:09 +0300)] 
IBSS RSN: Add IBSS-RSN-COMPLETED event message

This new control interface event message is used to indicate when
both 4-way handshakes have been completed with a new IBSS peer.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agotests: Silence wlantest clear_tdls_counters output from stdout
Jouni Malinen [Sun, 25 Aug 2013 18:48:51 +0000 (21:48 +0300)] 
tests: Silence wlantest clear_tdls_counters output from stdout

This removes unnecessary "OK" lines from test logs.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agotests: Redirect tcpdump output to a file
Jouni Malinen [Sun, 25 Aug 2013 18:43:21 +0000 (21:43 +0300)] 
tests: Redirect tcpdump output to a file

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agoP2P: Add state info to global STATUS command
Jouni Malinen [Sun, 25 Aug 2013 18:02:12 +0000 (21:02 +0300)] 
P2P: Add state info to global STATUS command

This can be used for debugging purposes to see what the current P2P
module state is.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agoAdd STATUS command to global control interface
Jouni Malinen [Sun, 25 Aug 2013 17:53:58 +0000 (20:53 +0300)] 
Add STATUS command to global control interface

This provides global status information that is applicable to all
interfaces (e.g., P2P state). In addition, ifname/address pairs are
listed to get information of all the interfaces that are currently
managed through this wpa_supplicant instance.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agoAdd SAVE_CONFIG command to global control interface
Jouni Malinen [Sun, 25 Aug 2013 17:41:39 +0000 (20:41 +0300)] 
Add SAVE_CONFIG command to global control interface

This iterates through all interfaces and saves configuration file
updates for each interface that allows it (update_config=1).

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agoAdd SET command for global control interface
Jouni Malinen [Sun, 25 Aug 2013 17:35:19 +0000 (20:35 +0300)] 
Add SET command for global control interface

This allows global parameters to be set through the global control
interface without having to use IFNAME prefix. For now, this covers
only the wifi_display parameter.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agotests: Save debug log to a file and clean up stdout status
Jouni Malinen [Sun, 25 Aug 2013 17:15:54 +0000 (20:15 +0300)] 
tests: Save debug log to a file and clean up stdout status

This makes it easier to figure out what failed and allows builbot to
integrate multiple logs and state information about the test cases.

Signed-hostap: Jouni Malinen <j@w1.fi>

11 years agoClear EAPOL supplicant configuration info on current_ssid changes
Jouni Malinen [Sun, 25 Aug 2013 16:46:57 +0000 (19:46 +0300)] 
Clear EAPOL supplicant configuration info on current_ssid changes

There were some code paths that allowed obsolete configuration data
pointer to be maintained within EAPOL supplicant in case a network was
removed while not connection to it (i.e., wpa_s->current_ssid not
pointing to the network that was removed). This could result in use of
freed memory, e.g., from eap_sm_notify_ctrl_attached() when a new
control interface connected prior to the EAPOL supplicant configuration
pointer got updated.

Signed-hostap: Jouni Malinen <j@w1.fi>