summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix a typo that caused builds to failbaserock/genivi/morphJonathan Maw2013-05-231-1/+1
|
* Merge branch 'baserock/jonathan/no-readline-2' into baserock/genivi/morphJonathan Maw2013-05-221-1/+3
|\ | | | | | | Reviewed-by: Lars Wirzenius <lars.wirzenius@codethink.co.uk>
| * Remove dependency on readlineJonathan Maw2013-05-221-1/+3
|/
* Install the wpa_supplicant binaries to the correct locationJonathan Maw2013-03-011-2/+1
|
* Added LIBNL32 flag to configBen Brewer2012-11-151-0/+1
|
* Setup config file correctlyBen Brewer2012-11-152-3/+527
|
* Fix syntax error in morphBen Brewer2012-11-141-1/+1
|
* Add wpa_supplicant morphBen Brewer2012-11-141-0/+14
|
* Fix forgotten no-CONFIG_WPS=y wrapperJouni Malinen2012-11-141-2/+1
| | | | | | | | | Commit 620c783753bddd37988269314862dc7e4a62f700 modified wpas_wps_ssid_wildcard_ok() prototype, but forgot to update the non-WPS-build wrapper. Fix that to match with the new bss parameter type and remove the now unused declaration of wpa_scan_res. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Allow OKC to be enabled by defaultJouni Malinen2012-11-129-7/+42
| | | | | | | | | | | Previously, OKC (opportunistic key caching, a.k.a. proactive key caching) could be enabled only with a per-network parameter (proactive_key_caching). The new global parameter (okc) can now be used to change the default behavior to be OKC enabled (okc=1) for network blocks that do not override this with the proactive_key_caching parameter. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Avoid extra group interface creation on GO reinvocationJouni Malinen2012-11-111-4/+13
| | | | | | | | | | | If separate group interfaces are used, the pending group interface got removed unnecessarily when stopping find operations when accepting an invitation to reinvoke the group in GO role. This resulted in the group interfaces getting created twice. Avoid this unnecessary extra operation by skipping removal of the pending interface in the reinvocation sequence. Signed-hostap: Jouni Malinen <j@w1.fi>
* Hide strict-aliasing warning with gcc 4.7Jouni Malinen2012-11-111-2/+2
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Avoid strict-aliasing warning with gcc 4.7Jouni Malinen2012-11-111-1/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* bgscan_learn: Prevent infinite busy loopingPawel Kulakowski2012-11-111-1/+4
| | | | | | | | | | | | In highly congested network (BSSes almost on every channel within ESS) we have hit a bug when wpa_supplicant become completly irresponsive, infinite looping on while loop. When probe_idx was equal 0 and we are not able to probe new frequency, following condition were never fulfilled: "if (!in_array(freqs, data->supp_freqs[idx]))" Signed-hostap: Pawel Kulakowski <pawel.kulakowski@tieto.com>
* dbus: Do not quote scan_freq and freq_listRobert Shade2012-11-111-1/+1
| | | | | | | scan_freq and freq_list are not parsed by wpa_config_parse_freqs if quoted. Signed-hostap: Robert Shade <robert.shade@gmail.com>
* nl80211: Roam correctly through cfg80211 without SMEChristopher Wiley2012-11-111-10/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the nl80211 driver in wpa_supplicant to correctly handle connecting to a new AP through cfg80211 without SME capability. As before, the driver will disconnect from the previously associated AP, but now we attempt to immediately connect to our intended AP. This prevents us from blacklisting the AP we were trying to connect to because of a semantic mismatch between cfg80211 and wpa_supplicant. The disconnect/connect patch generates a local disconnect nl80211 event which we discard because we're already correctly tracking the pending association request. In detail: cfg80211 does not support connecting to a new BSS while already connected to another BSS, if the underlying driver doesn't support separate authenticate and associate commands. wpa_supplicant is written to expect that this is a supported operation, except for a little error handling that disconnects from the current BSS when roaming fails and relies on autoconnect logic to reconnect later. However, this failure to connect is incorrectly attributed to the new AP we attempted to associate with, rather than a local condition in cfg80211. The combined effect of these two conditions is that full-mac drivers accessible through cfg80211 but without SME capability take a long time to roam across BSS's because wpa_supplicant will: 1) Fail to associate for local reasons 2) Disconnect and return that the association request failed 3) Blacklist the association target (incorrectly) 4) Do a scan 5) Pick a less desirable AP to associate with Signed-hostap: Christoper Wiley <wiley@chromium.org>
* Fix a typo in a commentJouni Malinen2012-11-111-1/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* atheros: Remove redundant l2_packet_get_own_addr callBaruch Siach2012-11-111-2/+1
| | | | | | | | Commit deca6eff74411b8c93e7c7c31406de7367a0b540 added a redundant call to l2_packet_get_own_addr. Use the information we already have in atheros_init. Signed-hostap: Baruch Siach <baruch@tkos.co.il>
* EAP-SIM/AKA server: Fix memory leak in error pathJouni Malinen2012-11-112-0/+2
| | | | | | | If identity round limit is reached, EAP-SIM/AKA session is terminated. This needs to free the allocated message. Signed-hostap: Jouni Malinen <j@w1.fi>
* Check hapd_iface more consistently in hostapd_disable_iface()Jouni Malinen2012-11-111-1/+2
| | | | | | | | There is no point in the hapd_iface == NULL validate after this pointer has been dereferences, so move the code dereferencing hapd_iface after the check. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Remove deprecated UFD config method and OOB ctrl_ifaceJouni Malinen2012-11-1120-751/+1
| | | | | | | | | | The UFD (USB flash drive) configuration method was deprecated in WSC 2.0. Since this is not known to be used, remove the UFD implementation from hostapd and wpa_supplicant to allow the WPS implementation to be cleaned up. This removes the now unused OOB operations and ctrl_iface commands that had already been deprecated by the new NFC operations. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Reduce redundant PSK generation for GOMasashi Honma2012-11-113-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The PSK generation done by pbkdf2_sha1() is one of the longest CPU time users according to our profiling from boot to GO started. So I have reduced some steps. I could boot a GO by this command sequence. ------------- add_net set_network 0 ssid '"DIRECT-XX"' set_network 0 psk '"123456789012345678901234567890123456789012345678901234567890123"' set_network 0 proto RSN set_network 0 key_mgmt WPA-PSK set_network 0 pairwise CCMP set_network 0 auth_alg OPEN set_network 0 mode 3 set_network 0 disabled 2 p2p_group_add persistent=0 freq=2412 ------------- By this sequence, pbkdf2_sha1() was called three times and the function calculates the same value each time. Reduce number of calls to pbkdf2_sha1() from 3 to 1 by caching the previous result. Signed-hostap: Masashi Honma <masashi.honma at gmail.com>
* new_dbus_handlers: Clear errnoPaul Stewart2012-11-111-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a few instances where dbus handlers test the value of errno to test whether strtoul completes successfully. Since strtoul does not clear errno, and there's no strong reason to suspect that errno is already clear, it is safer to clear it right before calling strtoul. Also, any failure in strtoul (setting errno non-zero) should be considered a failure. While testing using dbus-send, I found that a malformed network path can cause a crash due to net_id being left NULL. We should test for this before calling strtoul on it. Tested with: dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \ /fi/w1/wpa_supplicant1/Interfaces/0 \ org.freedesktop.DBus.Properties.Get \ string:fi.w1.wpa_supplicant1.Interface string:Networks dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \ /fi/w1/wpa_supplicant1/Interfaces/0 \ fi.w1.wpa_supplicant1.Interface.RemoveNetwork \ objpath:/fi/w1/wpa_supplicant1/Interfaces/0/Networks/0 dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \ /fi/w1/wpa_supplicant1/Interfaces/0 \ fi.w1.wpa_supplicant1.Interface.RemoveNetwork \ objpath:/fi/w1/wpa_supplicant1/Interfaces/0/Networks/0 dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply \ /fi/w1/wpa_supplicant1/Interfaces/0 \ fi.w1.wpa_supplicant1.Interface.RemoveNetwork \ objpath:/fi/w1/wpa_supplicant1/Interfaces/0 Signed-hostap: Paul Stewart <pstew@chromium.org> intended-for: hostap-1
* Remove unused wpa_supplicant_disassociate()Jouni Malinen2012-11-056-76/+0
| | | | | | | | This function is now unused after the last couple of commits that removed the last uses, so remove this to keep code simpler since all places that disassociate, can use deauthentication instead. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Use deauthentication instead of disassociation on RSN element mismatchJouni Malinen2012-11-051-1/+1
| | | | | | | | | | | | Even though the standard currently describes disassociation to be used for RSN element mismatch between Beacon/Probe Response frames and EAPOL-Key msg 3/4, this is unnecessary difference from other cases that deauthenticate. In addition, there is no point in leaving the 802.11 Authentication in place in this case. To keep things simpler, use deauthentication here to get rid of the only use of wpa_sm_disassociate(). Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Use deauthentication instead of disassociation if not associatedJouni Malinen2012-11-054-10/+12
| | | | | | | | cfg80211/mac80211 may reject disassociation command if association has not yet been formed. Use deauthentication in cases where it is possible that we are associating at the moment the command is issued. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Use wpa_drv_{disassociate,deauthenticate} while waiting for connectionJouni Malinen2012-11-051-4/+52
| | | | | | | | | | | | | | | | | | | wpa_supplicant_{disassociate,deauthenticate}() need to inform the driver about decision to disconnect even if this happens during the time when the driver is still trying to complete association. During that time, wpa_s->bssid is not set, so the code in these functions needs to figure out the correct BSSID based on that field or wpa_s->pending_bssid. In addition, it is possible that the BSSID is not even known at wpa_supplicant at this point in time when using drivers that perform BSS selection internally. In those cases, the disconnect command needs to be sent to the driver without the BSSID. This fixes issues where the driver (or cfg80211 in particular) may be left in mismatching state with wpa_supplicant when disconnection (e.g., due to a ctrl_iface command) happens between connection request and association event. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS: Add support for NFC connection handover with nfcpyJouni Malinen2012-11-041-2/+65
| | | | | | | This helper script can now handle both reading of a NFC tag and initiation of NFC connection handover if a peer NFC device is touched. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Move NFC tag processing into a separate functionJouni Malinen2012-11-041-22/+29
| | | | | | | This makes it cleaner to add processing of other NFC operations to the python script. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Move wpactrl setup into a separate functionJouni Malinen2012-11-041-4/+12
| | | | | | This makes it easier to share this functionality for new NFC use cases. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Add an example python script for NFC operationsJouni Malinen2012-11-031-0/+84
| | | | | | | wps-nfc.py uses nfcpy and python-wpactrl to provide NFC tag information to wpa_supplicant for WPS operations. Signed-hostap: Jouni Malinen <j@w1.fi>
* dbus: Add getter for WPS propertiesSven Neumann2012-11-035-0/+68
| | | | | | | Add "WPS" property to the DBus interface that allows to identify the active WPS method of a BSS. Signed-hostap: Sven Neumann <s.neumann@raumfeld.com>
* nl80211: Make debug log more readable for driver eventsJouni Malinen2012-11-031-0/+24
| | | | | | | Print the full name of the nl80211 event message in the debug log to make it easier to parse the debug log. Signed-hostap: Jouni Malinen <j@w1.fi>
* Handle assoc reject events without wpa_supplicant SMEJouni Malinen2012-11-031-0/+7
| | | | | | | | | | | | | | | | | | | If the driver indicates the association (or authentication) was rejected, wpa_supplicant should handle this connection failure similarly to other cases. Previously, this was only handled with drivers that use wpa_supplicant SME. In case of cfg80211-based drivers, a rejected association was actually already handled since cfg80211 generates a deauthentication event after indicating connection failure. However, rejected authentication resulted in wpa_supplicant waiting for authentication timeout to expire which is unnecessary long wait. Fix this by calling wpas_connection_failed() to use the common mechanism to reschedule a new connection attempt with the previously attempted BSSID blacklisted. Signed-hostap: Jouni Malinen <j@w1.fi>
* Add parameter checking and error reporting to wpa_blacklist APISasha Levitskiy2012-11-011-0/+9
| | | | Signed-off-by: Sasha Levitskiy <sanek@google.com>
* WPS: Reject invalid credential more cleanlyJouni Malinen2012-11-012-2/+12
| | | | | | | | | | | If WPS Registrar tries to provision a WPA/WPA2-Personal network without including a valid Network Key, the network block cannot be used to connect to the network. Reject such credential without adding the network block. This makes wpa_supplicant send WSC_NACK as a response to the invalid Credential and stop the provisioning process immediately rather than only after trying unsuccessfully to connect to the network. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Relax Bonjour SD query matchingJouni Malinen2012-10-311-2/+157
| | | | | | | | The DNS Name is allowed to use or not use domain name compression. To handle both cases, check human readable DNS Name match if binary matching does not show a hit. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Support multiple P2P SD Bonjour services with same keyJouni Malinen2012-10-311-32/+38
| | | | | | | | | | There may be multiple Bonjour PTR matches for the same key, so extend the P2P SD code for this to allow such entries to be added (i.e., do not override previously added value, but add a new one). Similarly, return multiple matches (one per Service TLV) for a query if it happens to match more than a single configured Bonjour service. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Allow discoverable interval for p2p_find to be configuredJouni Malinen2012-10-305-5/+93
| | | | | | | | | | | | | | | | | The new P2P_SET parameter disc_int can now be used to configure discoverable interval for p2p_find operations. The format of the command for setting the values is "P2P_SET disc_int <minDiscoverableInterval> <maxDiscoverableInterval> <max TUs for discoverable interval>". The first two parameters are given in units of 100 TUs (102.4 ms). The third parameter can be used to further limit the interval into a specific TU amount. If it is set to -1, no such additional limitation is enforced. It should be noted that the P2P specification describes the random Listen state interval to be in units of 100 TUs, so setting the max TU value to anything else than -1 is not compliant with the specification and should not be used in normal cases. The default parameters can be set with "P2P_SET disc_int 1 3 -1". Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Restore wpa_s->scan_req if scan trigger failsJouni Malinen2012-10-301-0/+2
| | | | | | | | | | | | | If the driver rejects the scan request while handling an external requested scan (e.g., SCAN command on ctrl_iface), wpa_s->scan_req gets cleared in wpa_supplicant_scan(). This can results in issues when the scheduled re-try of the scan in one seconds trigger another call to this function. If ap_scan==2 mode is used, this would result in new association attempt instead of a new scan. Avoid this by restoring value of wpa_s->scan_req in case the scan trigger fails and a new scan attempt is scheduled. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Clear pending_pd_before_join on PD timeoutJouni Malinen2012-10-291-0/+1
| | | | | | | | | wpas_p2p_pd_before_join_timeout() needs to clear the pending_pd_before_join flag to match other uses of this flag prior to calling wpas_p2p_join_start(). Without this, the flag could be left set which can cause following P2P operations to behave in unexpected ways. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Allow separate P2P group interface use to be disabledJouni Malinen2012-10-294-0/+17
| | | | | | | | The new p2p_no_group_iface=1 configuration parameter can now be used to disable the default behavior of adding a separate interface for the P2P group when driver support for concurrent interfaces is available. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Fix default p2p_group_idle timeout for P2P client roleJouni Malinen2012-10-281-2/+9
| | | | | | | | | | | | | | | | | Commit 0d30cc240fa36905b034dc9676f9d8da0ac18e56 forced wpa_s->current_ssid to be cleared in wpa_supplicant_mark_disassoc() which gets called from wpa_supplicant_event_disassoc(). This breaks the P2P group idle mechanism for the case where p2p_group_idle is not set (i.e., is the default 0) since wpas_p2p_group_idle_timeout() ignores the timeout in that case if the interface is not recognized as a client interface (which was based on wpa_s->current_ssid being set). Fix this by making wpas_p2p_is_client() default to client case if wpa_s->current_ssid is NULL. This is much more likely case since the P2P GO mode operation would not really clear the pointer without explicit request to disconnect. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Remove old OOB NFC interfaceJouni Malinen2012-10-2818-322/+19
| | | | | | | | | | The old WPS interface for using NFC has no known deployments and even the binary libraries referenced here are not easily available anymore. Since the new interface for using NFC with WPS covers the same functionality, remove the old implementation to clean up WPS implementation. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Use AP Channel attribute in credential to speed up scanJouni Malinen2012-10-286-1/+50
| | | | | | | | When WPS is used with NFC connection handover, the AP may indicate its operating channel within the credential information. Use this informatiom, if present, to speed up the scan process. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Add preliminary NFC connection handover support for EnrolleeJouni Malinen2012-10-287-1/+382
| | | | | | | | | | This commit adds new wpa_supplicant ctrl_iface commands to allow external programs to go through NFC connection handover mechanism with wpa_supplicant taking care of the WPS processing. This version includes only the case where wpa_supplicant is operating as a station/Enrollee. Signed-hostap: Jouni Malinen <j@w1.fi>
* Fix EAPOL supplicant port authorization with PMKSA cachingJouni Malinen2012-10-271-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | The previous eapol_sm_notify_cached() implementation forced the port to be authorized when receiving EAPOL-Key msg 1/4 that included a matching PMKID in cases when PMKSA caching is used. This is too early since the port should really be authorized only after the PTK has been configured which is the case when PMKSA caching is not used. Fix this by using the EAPOL supplicant PAE state machine to go through the AUTHENTICATING and AUTHENTICATED states instead of forcing a jump to AUTHENTICATED without performing full state machine steps. This can be achieved simply by marking eapSuccess TRUE at least with the current version of EAP and EAPOL state machines (the earlier commits in this function seemed to indicate that this may have not been that easy in the older versions due to the hacks needed here). This addresses an issue with nl80211-based driver interface when the driver depends on the STA Authorized flag being used to prevent unprotected frames from being accepted (both TX and RX) prior to PTK configuration. Signed-hostap: Jouni Malinen <j@w1.fi> intended-for: hostap-1
* P2P: Allow all channels with multi-channel concurrencyJouni Malinen2012-10-264-24/+45
| | | | | | | | | | If the driver indicates support for multi-channel concurrency, change the p2p_connect behavior to not force the current operating channel, but instead, just mark it as preferred for GO Negotiation. This change applies only for the case when the freq parameter is not used with the p2p_connect command. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Fix EAPOL processing when STA switches between multi-BSSesDavid Bird2012-10-251-3/+6
| | | | | | | | | | | | | | | | | | | | | There was an issue with EAPOL frame exchanges in a multi-BSS configuration when a station switches between the BSSes controlled by the same hostapd process. When processing the EAPOL packet, the array of virtual APs (iface->bss) is searched looking for the station that sent the packet in order to identify which signal context should be used during processing. The first match of the station in its list gets used in the ieee802_1x_receive() function. However, even after a station has disassociated, it remains in the list of stations pending an inactivity timeout. This leads to the wrong hapd context (one where the station had already disassociated) being used in some cases (if the current/active bss entry appears in the list after one where the station has just disassociated from) for EAPOL processing. Fix this by checking the WLAN_STA_ASSOC flag before assuming the right hapd context was found for the given station. Signed-hostap: David Bird <dbird@powercloudsystems.com> intended-for: hostap-1
* P2P: Add secondary device types into p2p_peer outputJouni Malinen2012-10-251-0/+13
| | | | | | | This allows the P2P_PEER command to be used to fetch the list of secondary device types that each P2P peer has advertised. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>