Commit message (Collapse)AuthorAgeFilesLines
* Sync manpages and command-line optionsDan Winship2014-01-212-4/+78
| | | | Signed-hostap: Dan Williams <dcbw@redhat.com>
* Add manpage for eapol_testDan Williams2014-01-212-1/+207
| | | | Signed-hostap: Dan Williams <dcbw@redhat.com>
* wpa_supplicant: Fix usage text based on build optionsDan Williams2014-01-211-3/+14
| | | | Signed-hostap: Dan Williams <dcbw@redhat.com>
* P2P: Reduce peer expiration age to 60 sec and allow customizationDmitry Shmidt2014-01-211-1/+3
| | | | | | | | | | The new default value (from 300 to 60 seconds) makes the internal P2P peer list somewhat faster to react to peers becoming unreachable while still maintaining entries for some time to avoid them disappearing during user interaction (e.g., selecting a peer for a connection or entering a PIN). Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* Skip normal scan when PNO is already in progressRaja Mani2014-01-212-0/+6
| | | | | | | | | | | | | | | | | | | Scan request failures are observed in wpa_supplicant debug log when Android framework starts PNO scan in driver via ctrl interface command 'set pno 1' and wpa_supplicant also tries to issue a scan request after PNO has started in the driver. Some drivers may reject a normal scan request when PNO is already in progress. wpa_supplicant should consider PNO status before issuing start scan request to the driver. Otherwise, wpa_supplicant will get failures from driver for the scan request and it will end up rescheduling scan request in periodic interval and get a start scan request failure for each attempt. In order to avoid unnecessary scan attempt when PNO scan is already running, PNO status is checked before issuing scan request to driver. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Extend the listen time based on the active concurrent sessionRashmi Ramanna2014-01-203-6/+31
| | | | | | | | | | A P2P Device while in the Listen state waiting to respond for the obtained group negotiation request shall give a fair chance for other concurrent sessions to use the shared radio by inducing an idle time between the successive listen states. However, if there are no concurrent operations, this idle time can be reduced. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Verify peer discovery in no-Probe Request caseJouni Malinen2014-01-171-0/+44
| | | | | | | Verify that PD Request followed by GO Negotiation Request is enough to learn the Listen frequency of the peer. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Allow GO Negotiation Request to update peer entry after PDPo-Lun Lai2014-01-171-0/+12
| | | | | | | | | | | | | | Previously, GO Negotiation Request frame was used to update a peer entry if only a Probe Request from that peer had been received. However, it would be possible, even if unlikely, for a peer to be discovered based on receiving Provision Discovery Request frame from it and no Probe Request frame. In such a case, the Listen frequency of the peer would not be known and group formation could not be (re-)initialized with that peer. Fix this by allowing the GO Negotiation Request frame to update peer entry if the current peer entry does not include Listen or Operating frequency. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* hwsim tests: vm: add optional time-warpJohannes Berg2014-01-172-1/+17
| | | | | | | | | To test the code under the influence of time jumps, add the option (--timewarp) to the VM tests to reset the clock all the time, which makes the wall clock time jump speed up 20x, causing gettimeofday() to be unreliable for timeout calculations. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* P2P: Add missing direct global ctrl_iface commands for P2PDmitry Shmidt2014-01-171-0/+8
| | | | | | | | | | | It should be noted that these commands are not exclusively used for P2P or in the global context, so use of these commands through the global control interface for operations that are specific to a single interface have undefined behavior and that behavior may change in the future. As such, these are recommend only for operations that are in the global context (e.g., for P2P management). Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* P2P: Use GO's operating channel to optimize scan during joinJithu Jance2014-01-171-0/+12
| | | | | | | Use P2P GO's operating channel information, if known, to do a single channel scan during the join operation. Signed-hostap: Jithu Jance <jithu@broadcom.com>
* P2P: Don't expire the peer, if GO Negotiation is in progressJithu Jance2014-01-171-0/+9
| | | | | | | | This adds one more case of active P2P peer detection so that p2p_expire_peers() cannot hit a case where a GO Negotiation peer would be removed. Signed-hostap: Jithu Jance <jithu@broadcom.com>
* Use minimal scan delay upon EVENT_INTERFACE_ADDEDArend van Spriel2014-01-172-1/+4
| | | | | | | | | | | | | | This patch resets the static interface_count to zero in case of wpa_supplicant_driver_init() call for wpa_s which is in INTERFACE_DISABLED state. This interface_count is used for the delay of the scan which is now minimal for dynamically added interfaces. This may collide with a scan for another interface, but the same is true for any chosen delay in this scenario. Also the state change to DISCONNECTED is moved to wpa_supplicant_driver_init() so it will move from INTERFACE_DISABLED to INACTIVE when there are no enabled networks. Tested-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com>
* Reset normal_scans counter upon entering INTERFACE_DISABLED stateArend van Spriel2014-01-171-0/+5
| | | | | | | | | | | | | Depending on the implementation, the scheduled scan may not give results quickly when in DISCONNECTED state. This patch resets wpa_s::normal_scans upon entering to the INTERFACE_DISABLED state so a normal scan is assured upon going to DISCONNECTED state after the interface has been re-enabled. This mainly solves a long reconnect time observed upon repeated kernel driver reloads, i.e., third reload resulted in a scheduled scan. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-hostap: Arend van Spriel <arend@broadcom.com>
* tests: Add some delay before wlantest operationsJouni Malinen2014-01-142-0/+8
| | | | | | | | | | | Since wlantest is a separate process that is not synchronized with rest of the test components, there can be some latency in it having the STA entries and counters updated. There is a race condition between this happening and then test script clearing or fetching data. Make this race condition less likely to cause bogus test failures by adding some wait between these operations. Signed-hostap: Jouni Malinen <j@w1.fi>
* tests: Run dump_monitor() again if scan was pendingJouni Malinen2014-01-141-0/+1
| | | | | | | | | | | In addition to running the FLUSH command again, the pending monitor interface events need be cleared in case the driver was running a scan when reset() is called. This avoids issues, e.g., with discovery_dev_id failing due to an unexpected P2P-DEVICE-FOUND event that was generated by the pending scan operation that had not yet complete when the first dump_monitor() call in reset() happened. Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Pass station supported channel and oper class infoSunil Dutt2014-01-141-0/+16
| | | | | | | Pass station supported channel and operating class information to kernel for TDLS peers. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>x
* TDLS: Pass peer's Supported channel and oper class info during sta_addSunil Dutt2014-01-148-7/+116
| | | | | | | | | The information of the peer's supported channel and operating class is required for the driver to do TDLS off channel operations with a compatible peer. Pass this information to the driver when the peer station is getting added. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* hostapd: DFS setup seg0 correctly for HT40-Janusz Dziedzic2014-01-141-2/+4
| | | | | | Fix seg0 calculation for HT40+/HT40-. Signed-hostap: Janusz Dziedzic <janusz.dziedzic@tieto.com>
* hostapd: DFS/CSA check if CSA in progressJanusz Dziedzic2014-01-141-3/+7
| | | | | | | Check if CSA is already in progress, before triggering a new channel switch. Signed-hostap: Janusz Dziedzic <janusz.dziedzic@tieto.com>
* Android: Remove hostapd dump_file functionalityDmitry Shmidt2014-01-141-1/+0
| | | | Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* hwsim tests: vm: read a config file from $HOMEJohannes Berg2014-01-141-0/+1
| | | | | | | | The vm-config in the subdirectory is less useful as it will get removed by "git clean" and similar, so read a config file from ~/.wpas-vm-config in addition. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* hwsim tests: add a hwsim controller moduleJohannes Berg2014-01-142-0/+287
| | | | | | | The controller module allows adding/destroying radios on the fly with the recent hwsim changes. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* P2P: Limit join-a-group scans based on SSID from invitationJouni Malinen2014-01-132-16/+49
| | | | | | | | | | If we already know the SSID of the P2P group we are trying to join, use that SSID to limit scan responses and BSS selection since we do not really look for any other network in this case. In addition, this can fix cases where the peer has just changed its SSID (e.g., started a new group) and there may be multiple BSS entries for the same BSSID. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Double the connection timeout for EAP casesJouni Malinen2014-01-131-3/+6
| | | | | | | | It looks like slow virtual machines may have issues to complete some EAP authentication cases (e.g., EAP-EKE in ap_ft_eap) within the 10 second timeout under load. Double the timeout to avoid incorrect test failures. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: Clear data from ongoing scan on reset()Jouni Malinen2014-01-131-0/+4
| | | | | | | | | | | | | | | | | It was possible for the previous test case to leave unexpected BSS or P2P peer table entries if a scan was in progress when the FLUSH command was used. This could result in test failures, e.g., when running discovery_dev_type_go followed by discovery_group_client where a P2P peer was discovered on another channel at the end of the former test case from a scan that was running durign the FLUSH operation that was supposed to remove all P2P peers. This could result in discovery_group_client failing due to dev[2] trying to send the discoverability frame on incorrect channel (the one learned in the previous test case) since discover_peer() skipped a new device discovery. Fix this by running FLUSH operation again if a pending scan operation is detected during the first FLUSH operation. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Flush secondary device types on FLUSH commandJouni Malinen2014-01-081-0/+1
| | | | | | | This makes it possible to clear previously configured secondary device types. Signed-hostap: Jouni Malinen <j@w1.fi>
* tests: P2P device discovery filtering on Device ID and Device TypeJouni Malinen2014-01-082-3/+69
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Allow requested device type to be specified with p2p_findJouni Malinen2014-01-082-3/+17
| | | | | | | This allows filtering of P2P peers that reply to the device discovery Probe Request frames. Signed-hostap: Jouni Malinen <j@w1.fi>
* tests: EAP-TLS with OCSPJouni Malinen2014-01-085-3/+45
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* tests: PKCS#12 use for EAP-TLSJouni Malinen2014-01-083-3/+31
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* tests: CA certificate in DER formatJouni Malinen2014-01-082-1/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* tests: Server certificate trust based on hash valueJouni Malinen2014-01-081-0/+49
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* tests: subject_match and altsubject_matchJouni Malinen2014-01-082-4/+121
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Clear configuration blobs on FLUSH commandJouni Malinen2014-01-083-12/+19
| | | | | | | | All te network blocks and credentials were already cleared, but configurations blobs should also be cleared here, e.g., to get more consistent behavior test cases using EAP-FAST PACs. Signed-hostap: Jouni Malinen <j@w1.fi>
* tests: EAP-FASTJouni Malinen2014-01-082-3/+28
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Skip network disabling on expected EAP failureJouni Malinen2014-01-0812-19/+69
| | | | | | | | | | Some EAP methods can go through a step that is expected to fail and as such, should not trigger temporary network disabling when processing EAP-Failure or deauthentication. EAP-WSC for WPS was already handled as a special case, but similar behavior is needed for EAP-FAST with unauthenticated provisioning. Signed-hostap: Jouni Malinen <j@w1.fi>
* EAP-FAST peer: Make debug clearer on missing pac_file configurationJouni Malinen2014-01-081-0/+8
| | | | | | | | EAP-FAST requires pac_file to be configured, so make it clearer from the debug output if missing configuration parameter was the reason for EAP-FAST initialization failing. Signed-hostap: Jouni Malinen <j@w1.fi>
* tests: Verify all implemented EAP-pwd groupsJouni Malinen2014-01-081-0/+11
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* tests: Include vendor extension in WPS M1Jouni Malinen2014-01-071-0/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* tests: WPS AP using fragmented WPS IEJouni Malinen2014-01-071-0/+25
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* tests: WPS 2.0 AP rejecting WEP configurationJouni Malinen2014-01-071-0/+23
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* tests: External password storageJouni Malinen2014-01-072-1/+49
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* EXT PW: Fix hash return in password fetchingJouni Malinen2014-01-071-0/+2
| | | | | | | | | The hash return buffer was previously left uninitialized in case externally stored password ("password=ext:...") was used. This could result in MSCHAPv2 failure if that uninitialized memory happened to be something else than zero. Signed-hostap: Jouni Malinen <j@w1.fi>
* hostapd: Skip full AP configuration validation on SET commandJouni Malinen2014-01-074-23/+33
| | | | | | | | | | | It is possible for the configuration to be temporarily invalid when adding a new AP through SET commands followed by ENABLE. Avoid this issue by using less strict validation on SET commands and perform full configuration validation only on ENABLE. Use cases with configuration file maintain their previous behavior, i.e., full validation after the file has been read. Signed-hostap: Jouni Malinen <j@w1.fi>
* tests: Hidden SSIDJouni Malinen2014-01-072-1/+79
| | | | | | | | In addition, add the earlier tests in the new test_ssid.py file that was forgotten from the previous commit d78f33030d9b3ecc7ad73ba3f544fc84b08d06ea. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Wait on GO Negotiation Confirm transmitArik Nemtsov2014-01-071-1/+1
| | | | | | | | | | | | | This reverts commit 792c8877c3e9558a6def558c6d35833a00571683 ('P2P: Send GO Negotiation Confirm without wait'). Some drivers rely on the wait period for sending packets on the off-channel. If the wait value is small, there's a race condition where the driver ROC might complete before the packet was sent out. This doesn't impede other drivers, as the wait is cancelled when a Tx-completion arrives from the remote peer. Signed-hostap: Arik Nemtsov <arik@wizery.com>
* P2P: Cancel action frame offchan wait after recv GO Neg ConfEyal Shapira2014-01-071-0/+1
| | | | | | | | | | The missing call to scan_action_done() may keep us off-channel for 250 ms following sending GO Negotiation Response. In case the operating channel is different from this channel and we're GO, a race could lead to start beaconing while off-channel. This could potentially cause the Beacon frames to go out on incorrect channel with some drivers. Signed-hostap: Eyal Shapira <eyal@wizery.com>
* bsd: Fix NULL pointer dereference on error pathJouni Malinen2014-01-071-2/+2
| | | | | | | | | The error path in bsd_init() on struct bsd_driver_data allocation was jumping to location where drv is dereferenced. That will crash and it is easier to just return from the function since no cleanup steps are needed in this case. Signed-hostap: Jouni Malinen <j@w1.fi>
* bsd: Prepare event buffer on init processMasashi Honma2014-01-071-32/+30
| | | | | | | | | | | | | | | Currently these three steps runs for each event. 1. get buffer size via system 2. allocate a memory for event 3. free the memory The wpa_supplicant receives 4 events from boot to be connected. So this patch prepare the event buffer at the init process. I have tested wpa_supplicant on NetBSD 6.1.2. But I could not tested hostapd because I do not have AP enabled device. Signed-hostap: Masashi Honma <masashi.honma@gmail.com>