path: root/wpa_supplicant
Commit message (Collapse)AuthorAgeFilesLines
* Fix cert_in_cb parsing in wpa_supplicant.confJouni Malinen2017-01-071-0/+1
| | | | | | | | | Commit 483dd6a5e0069d0646505c26a5194eda15472858 ('Include peer certificate always in EAP events') added this wpa_supplicant global configuration parameter, but forgot to add the actual parsing of it, so there was no way of setting the value. Signed-off-by: Jouni Malinen <j@w1.fi>
* Fix writing of wpa_supplicant sae_groups configuration parameterJouni Malinen2017-01-071-1/+1
| | | | | | | This integer array is zero terminated, so need to check the value is greater than 0 when writing the parameter. Signed-off-by: Jouni Malinen <j@w1.fi>
* RRM: Use wpa_hexdump_buf() instead of wpa_hexdump()Jouni Malinen2017-01-071-2/+1
| | | | | | | Simplify the code a bit by using the appropriate debugging function to dump a wpabuf contents. Signed-off-by: Jouni Malinen <j@w1.fi>
* RRM: Document Link Measurement Report frame construction stepsJouni Malinen2017-01-071-1/+5
| | | | | | | | Add a comment to note which fields are expected to be updated by the driver. In addition, reorder subfield writing to match the order in which the fields are in the frame. Signed-off-by: Jouni Malinen <j@w1.fi>
* RRM: Fix beacon report scan channels for VHT 80, 80+80, 160 MHz casesJouni Malinen2017-01-071-0/+6
| | | | | | | | ieee80211_chan_to_freq() is not really meant for conversion of 20 MHz primary channel numbers for wider VHT channels, so handle those as special cases here for now. Signed-off-by: Jouni Malinen <j@w1.fi>
* RRM: Move wpabuf_resize() call into wpas_rrm_report_elem()Jouni Malinen2017-01-071-42/+15
| | | | | | | | | | | | | wpabuf_resize() can handle the initial allocation of a wpabuf and all the other callers of wpas_rrm_report_elem() were already using a pointer to a pointer and a wpabuf_resize() call. Simplify this by resizing the wpabuf (if needed) within wpas_rrm_report_elem() instead of having to calculate the needed size in all the callers. Thsi is also fixing one of the allocation sizes to use the correct size instead of a size of a struct that has nothing to do with the allocation (but is larger than the needed five octets, so does not break anything). Signed-off-by: Jouni Malinen <j@w1.fi>
* RRM: Remove unnecessary cb checkJouni Malinen2017-01-071-6/+0
| | | | | | | | | There is only a single caller for wpas_rrm_send_neighbor_rep_request() and it unconditionally uses a callback function, so cb cannot be NULL here and there is no need for additional complexity and extra code size to check for it explicitly. Signed-off-by: Jouni Malinen <j@w1.fi>
* bgscan_simple: Fix short_scan_count comparisonBeni Lev2017-01-051-6/+1
| | | | | | | | | | Previously, the check was done after we reached the maximum and another scan was already triggered. While at it, remove an irrelevant comment that the previous change in the logic here missed. Signed-off-by: Beni Lev <beni.lev@intel.com>
* eap_proxy: On SIM error flush PMKSAs only for SIM/AKA/AKA' networksPurushottam Kushwaha2017-01-041-1/+29
| | | | | | | | | Previously, SIM state change with SIM_STATE_ERROR cleared all PMKSA entries (including non-SIM networks). Limit this to networks which use SIM-based authentication methods to avoid unnecessarily removal of PMKSA entries. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Fix OOM handling in neighbor report response handlingJouni Malinen2017-01-031-1/+3
| | | | | | | | The pending neighbor report state needs to be cleared on error path here to avoid getting stuck with being unable to perform any additional neighbor reports during the association. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Allow LCI request with no subelementsJouni Malinen2017-01-031-1/+2
| | | | | | | Allow shorter request since the subelements are optional to include. Also print the hexdump of the subelements into debug log. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* RRM: Enable beacon report with active/passive scan for all driversJouni Malinen2017-01-035-13/+75
| | | | | | | | | The requested behavior can be approximated for most use cases even if the driver does not support reporting exact TSF values for frames. Enable this capability for all drivers to make beacon report processing more useful for a common use case. Signed-off-by: Jouni Malinen <j@w1.fi>
* Enable Beacon Report using beacon table for all driversJouni Malinen2017-01-032-5/+7
| | | | | | | | | The special parameters for beacon report scan are not needed for the beacon report when using the beacon table measurement mode. Advertise support for this case regardless of whether the driver supports the scan parameters. Signed-off-by: Jouni Malinen <j@w1.fi>
* Update copyright notices for the new year 2017Jouni Malinen2017-01-0311-17/+17
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* wpa_supplicant: Add support for Beacon Report Radio MeasurementAvraham Stern2017-01-037-5/+796
| | | | | | | | Beacon Report Radio Measurement is defined in IEEE Std 802.11-2016, Beacon Report is implemented by triggering a scan on the requested channels with the requested parameters. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* common: Add helper function to convert RSSI to RCPIAvraham Stern2017-01-031-15/+1
| | | | | | | This conversion will be done several times in the code, so add a helper function that does this conversion. Signed-off-by: Avrahams Stern <avraham.stern@intel.com>
* wpa_supplicant: Extend verify_channel() and make it globalAvraham Stern2017-01-033-23/+41
| | | | | | | | | Extend verify_channel() to return whether IR is allowed on the channel or not, and make it a global function so it can be used in other files, too. This makes this function useful for checking not only if a channel is supported but also if it is allowed for active and passive scan. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* driver: Add scan support to beacon reportAvraham Stern2017-01-031-0/+2
| | | | | | | | | | | | | | | | | | | Add the following parameters to scan request: 1. Dwell time on each channel. 2. Whether the specified dwell time is mandatory. In addition, add to scan results info the time that the scan actually started, and to each scan result the time the beacon/probe was received, both in terms of TSF of the BSS that the interface that requested the scan is connected to (if available). Add flags to indicate whether the driver supports dwell time configuration and scan information reporting. This scan configuration and information is required to support beacon report radio measurement. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* wpa_supplicant: Refactor wpas_rrm_build_lci_report()Avraham Stern2017-01-031-32/+46
| | | | | | | | | | | 1. Change the return type to reflect whether building the report succeeded or failed. 2. Change argument type to rrm_measurement_request_element instead of raw packet data to ease processing the request. 3. Use already existing function to create the measurement report and add it to the report buffer. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* wpa_supplicant: Send rejection for unsupported radio measurementsAvraham Stern2017-01-031-1/+47
| | | | | | | | | | | | | | Send measurement report with the mode field set to incapable in response to measurement requests with unsupported measurement types. In addition, measurements requests that request parallel measurements are rejected since these features are not supported. Measurement request frames with the enable bit set are ignored since these are not really requesting measurements and are not supported for now. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* wpa_supplicant: Limit RRM response size to MMPDU sizeAvraham Stern2017-01-032-22/+55
| | | | | | | | | The length of a Measurement Report frame should be limited by the maximum allowed MMPDU size (IEEE Std 802.11-2016, Enforce this size limit, and in case the report elements are longer than the allowed size, split them between several MPDUs. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* wpa_supplicant: Refactor Radio Measurement Request handlingAvraham Stern2017-01-031-50/+76
| | | | | | | | Extract the code dealing with processing the measurement request elements to a separate function. This will be needed for beacon report requests processing. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* wpa_supplicant: Validate RRM request frame formatAvraham Stern2017-01-031-16/+38
| | | | | | | | | | | | RRM request frame should contain only information elements of type Radio Measurement Request. Go through all the frame and validate that only elements of this type are included. In addition, if a truncated element is encountered, or the element length field indicates that the element length is more than the entire frame, abort the request. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* wpa_supplicant: Move RRM implementation to a dedicated fileAvraham Stern2017-01-034-484/+502
| | | | | | | As support for new RRM measurements will be added, the RRM implementation will become quite large, so move it to a dedicated file. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* Fix LCI request subelement processingJouni Malinen2017-01-031-0/+1
| | | | | | | | | | | | | | | | Commit 4a742011abca8a9c185cc40d17783cfa4c9af757 ('wpa_supplicant: Handle LCI request') introduced LCI request parsing in a manner that incremented the request pointer by four within wpas_rrm_build_lci_report() without decrementing len correspondingly. This could potentially result in get_ie() reading four octets beyond the buffer if a corrupted request is received. This would be applicable only if the LCI reporting was enabled explicitly ("SET LCI ..." control interface command). Fix this by updating the len variable to match the request pointer changes. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Add CONFIG_MESH into wpa_supplicant defconfigMasashi Honma2016-12-301-0/+3
| | | | Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
* wpa_cli: Add commands to use PMKSA_GET/ADDMasashi Honma2016-12-301-0/+24
| | | | Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
* mka: Make MKA actor priority configurableBadrish Adiga H R2016-12-256-4/+22
| | | | | | | This adds a new wpa_supplicant network profile parameter mka_priority=0..255 to set the priority of the MKA Actor. Signed-off-by: Badrish Adiga H R <badrish.adigahr@gmail.com>
* D-Bus: Use a helper function to get possibly NULL stringsJouni Malinen2016-12-234-68/+52
| | | | | | | This type of check is used in quite a few getter functions, so add a helper function to take care of it. Signed-off-by: Jouni Malinen <j@w1.fi>
* D-Bus: Add DeviceType in WPS propertyAvichal Agarwal2016-12-233-0/+75
| | | | Signed-off-by: Avichal Agarwal <avichal.a@samsung.com>
* D-Bus: Add device serial number in WPS propertyAvichal Agarwal2016-12-233-0/+66
| | | | | Signed-off-by: Avichal Agarwal <avichal.a@samsung.com> Signed-off-by: Mayank Haarit <mayank.h@samsung.com>
* D-Bus: Add model number in WPS propertyAvichal Agarwal2016-12-233-0/+67
| | | | | Signed-off-by: Avichal Agarwal <avichal.a@samsung.com> Signed-off-by: Mayank Haarit <mayank.h@samsung.com>
* D-Bus: Add WPS model name as propertyAvichal Agarwal2016-12-233-0/+66
| | | | | Signed-off-by: Avichal Agarwal <avichal.a@samsung.com> Signed-off-by: Kyeong-Chae Lim <kcya.lim@samsung.com>
* D-Bus: Add WPS manufacturer as propertyAvichal Agarwal2016-12-233-0/+67
| | | | | | Signed-off-by: Avichal Agarwal <avichal.a@samsung.com> Signed-off-by: Kyeong-Chae Lim <kcya.lim@samsung.com> Signed-off-by: Mayank Haarit <mayank.h@samsung.com>
* D-Bus: Add WPS device name as propertyAvichal Agarwal2016-12-233-0/+67
| | | | | | Signed-off-by: Avichal Agarwal <avichal.a@samsung.com> Signed-off-by: Kyeong-Chae Lim <kcya.lim@samsung.com> Signed-off-by: Mayank Haarit <mayank.h@samsung.com>
* mesh: Show [MESH] flag in print_bss_info()Sunil Dutt2016-12-221-2/+13
| | | | | | | | | | | This was previously done for SCAN_RESULTS, but the BSS control interface command did not show a similar flag. In addition, change "WPA2" to "RSN" for mesh BSS to be consistent with the SCAN_RESULTS output. Commit 638d945679649da579c4ed734d4ebae87e2307de ('mesh: Show [MESH] flag in scan results') did similar changes for SCAN_RESULTS. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* wpa_supplicant: Add BSS CURRENT control interface commandJoel Cunningham2016-12-211-0/+2
| | | | | | | | | | This commit extends the BSS commands to include "BSS CURRENT" as a way to get the current BSS without having to walk the BSS list matching against BSSID+SSID returned from the STATUS command. This returns the BSS stored in wpa_s->current_bss. Signed-off-by: Joel Cunningham <joel.cunningham@me.com>
* eap_proxy: Add support for SIM state change indication from eap_proxyPurushottam Kushwaha2016-12-191-0/+22
| | | | | | | | | | | | This registers a new callback to indicate change in SIM state. This helps to do some clean up (more specifically pmksa_flush) based on the state change of the SIM. Without this, the reconnection using the cached PMKSA could happen though the SIM is changed. Currently eap_proxy_sim_state corresponds to only SIM_STATE_ERROR. This can be further extended. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* D-Bus: Add 'freq' option to P2P Find method to specify starting channelAmit Purwar2016-12-191-1/+6
| | | | | | | | This allows user to start P2P Find/Scan on a particular frequency and then move to scanning social channels. This support is already present on control socket. Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
* Android: Add p2p_add_cli_chan=1 optionMikael Kanstrup2016-12-181-0/+1
| | | | | | | | | | | Add p2p_add_cli_chan=1 option to p2p_supplicant.conf to allow Wi-Fi P2P operating as P2P client on passive scan channels. In addition, add p2p_add_cli_chan=1 option to wpa_supplicant.conf to have consistency in P2P channel list. There is a case where P2P channel list is updated with different channels from p2p0 and wlan0. Signed-off-by: Tomoharu Hatano <tomoharu.hatano@sonymobile.com>
* PAE: Make KaY specific details available via control interfaceBadrish Adiga H R2016-12-181-0/+6
| | | | | | Add KaY details to the STATUS command output. Signed-off-by: Badrish Adiga H R <badrish.adigahr@hpe.com>
* FILS: Make FILS Indication element information available in BSS outputJouni Malinen2016-12-181-0/+81
| | | | | | | This extends wpa_supplicant BSS command to parse FILS Indication element. Signed-off-by: Jouni Malinen <j@w1.fi>
* FILS: Add Realm Information ANQP-element in BSS dataJouni Malinen2016-12-184-0/+17
| | | | | | | Add a named BSS command output entry for FILS Realm Information ANQP-element (anqp_fils_realm_info). Signed-off-by: Jouni Malinen <j@w1.fi>
* Fix preauth_test build by updating add_pmkid/remove_pmkid callbacksJouni Malinen2016-12-141-2/+2
| | | | | | | | | Commit c579312736163d8d038542408daaefad9659815d ('Add PMKSA-CACHE-ADDED/REMOVED events to wpa_supplicant') added new arguments to these callback functions, but forgot to update the implementations in preauth_test.c. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Make Beacon IEs available in wpa_supplicant BSS commandJouni Malinen2016-12-131-0/+21
| | | | | | | | | | | This makes both the Probe Response and Beacon frame IEs available to upper layers if scan results include both IE sets. When the BSS command mask includes WPA_BSS_MASK_BEACON_IE, a new beacon_ie=<hexdump> entry will be included in output if the BSS entry has two separate sets of IEs (ie=<hexdump> showing the Probe Response frame contents and beacon_ie=<hexdump> the Beacon rame contents). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* mesh: Fix channel configuration in pri/sec switch caseJouni Malinen2016-12-131-7/+15
| | | | | | | | | | | | | | If 20/40 MHz co-ex scan resulted in switching primary and secondary channels, mesh setup failed to update the frequency parameters for hostapd side configuration and that could result in invalid secondary channel configuration preventing creating of the mesh network. This could happen, e.g., when trying to set up mesh on 5 GHz channel 36 and co-ex scan finding a BSS on channel 40. Switching the pri/sec channels resulted in hostapd code trying to check whether channel 32 is available. Fix this by swapping the channels for hostapd configuration when needed. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* External persistent storage for PMKSA cache entriesJouni Malinen2016-12-125-0/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds new wpa_supplicant control interface commands PMKSA_GET and PMKSA_ADD that can be used to store PMKSA cache entries in an external persistent storage when terminating a wpa_supplicant process and then restore those entries when starting a new process. The previously added PMKSA-CACHE-ADDED/REMOVED events can be used to help in synchronizing the external storage with the memory-only volatile storage within wpa_supplicant. "PMKSA_GET <network_id>" fetches all stored PMKSA cache entries bound to a specific network profile. The network_id of the current profile is available with the STATUS command (id=<network_id). In addition, the network_id is included in the PMKSA-CACHE-ADDED/REMOVED events. The output of the PMKSA_GET command uses the following format: <BSSID> <PMKID> <PMK> <reauth_time in seconds> <expiration in seconds> <akmp> <opportunistic> For example: 02:00:00:00:03:00 113b8b5dc8eda16594e8274df4caa3d4 355e98681d09e0b69d3a342f96998aa765d10c4459ac592459b5efc6b563eff6 30240 43200 1 0 02:00:00:00:04:00 bbdac8607aaaac28e16aacc9152ffe23 e3dd6adc390e685985e5f40e6fe72df846a0acadc59ba15c208d9cb41732a663 30240 43200 1 0 The PMKSA_GET command uses the following format: <network_id> <BSSID> <PMKID> <PMK> <reauth_time in seconds> <expiration in seconds> <akmp> <opportunistic> (i.e., "PMKSA_ADD <network_id> " prefix followed by a line of PMKSA_GET output data; however, the reauth_time and expiration values need to be updated by decrementing them by number of seconds between the PMKSA_GET and PMKSA_ADD commands) For example: PMKSA_ADD 0 02:00:00:00:03:00 113b8b5dc8eda16594e8274df4caa3d4 355e98681d09e0b69d3a342f96998aa765d10c4459ac592459b5efc6b563eff6 30140 43100 1 0 PMKSA_ADD 0 02:00:00:00:04:00 bbdac8607aaaac28e16aacc9152ffe23 e3dd6adc390e685985e5f40e6fe72df846a0acadc59ba15c208d9cb41732a663 30140 43100 1 0 This functionality is disabled be default and can be enabled with CONFIG_PMKSA_CACHE_EXTERNAL=y build configuration option. It should be noted that this allows any process that has access to the wpa_supplicant control interface to use PMKSA_ADD command to fetch keying material (PMK), so this is for environments in which the control interface access is restricted. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Add PMKSA-CACHE-ADDED/REMOVED events to wpa_supplicantJouni Malinen2016-12-121-2/+30
| | | | | | | These allow external program to monitor PMKSA cache updates in preparation to enable external persistent storage of PMKSA cache. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Set p2p_persistent_group=1 at the time of reading disabled=2Avichal Agarwal2016-12-121-0/+3
| | | | | | | | | | Configuration file network block with disabled=2 is used for storing information about a persistent group, so p2p_persitent_group should be updated according to this when creating a struct wpa_ssid instance. This will end up using D-Bus persistent network object path for the network. Signed-off-by: Avichal Agarwal <avichal.a@samsung.com> Signed-off-by: Kyeong-Chae Lim <kcya.lim@samsung.com>
* Remove MBO dependency from Supported Operating Classes elementvamsi krishna2016-12-117-331/+325
| | | | | | | | Supported Operating Classes element and its use is define in the IEEE 802.11 standard and can be sent even when MBO is disabled in the build. As such, move this functionality out from the CONFIG_MBO=y only mbo.c. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>