Commit message (Collapse)AuthorAgeFilesLines
* OpenSSL: Fix compilation for version < 1.1.0 without CONFIG_ECCHEADpendingmasterWolfgang Steinwender3 days1-0/+2
| | | | | | | | When CONFIG_ECC is not defined, openssl/ec.h is not included and EC_KEY not known. Fix be not defining EVP_PKEY_get0_EC_KEY() when CONFIG_ECC is not defined. Signed-off-by: Wolfgang Steinwender <wsteinwender@pcs.com>
* Add helper functions for parsing RSNXE capabilitiesJouni Malinen3 days11-55/+75
| | | | | | | | Simplify the implementation by using shared functions for parsing the capabilities instead of using various similar but not exactly identical checks throughout the implementation. Signed-off-by: Jouni Malinen <j@w1.fi>
* SAE: Remove now unused password identifier argument from non-H2E caseJouni Malinen3 days6-43/+20
| | | | | | | | | | | | | IEEE Std 802.11-2020 mandates H2E to be used whenever an SAE password identifier is used. While this was already covered in the implementation, the sae_prepare_commit() function still included an argument for specifying the password identifier since that was used in an old test vector. Now that that test vector has been updated, there is no more need for this argument anymore. Simplify the older non-H2E case to not pass through a pointer to the (not really used) password identifier. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* PASN: Change PASN flows to use SAE H2E onlyIlan Peer3 days2-31/+57
| | | | | | | | Do so for both wpa_supplicant and hostapd. While this was not explicitly required in IEEE P802.11az/D3.0, likely direction for the draft is to start requiring use of H2E for all cases where SAE is used with PASN. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
* tests: Update PASN tests with SAE to use sae_pwe=2Ilan Peer3 days1-45/+73
| | | | | | | As a preparation for changing wpa_supplicant and hostapd implementation to use SAE H2E only. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
* tests: Use the correct SSID in PASN SAE testsIlan Peer3 days1-5/+5
| | | | Signed-off-by: Ilan Peer <ilan.peer@intel.com>
* tests: Add coverage for PASN authentication with KDK derivationIlan Peer3 days1-0/+17
| | | | Signed-off-by: Ilan Peer <ilan.peer@intel.com>
* PASN: Derive KDK only when requiredIlan Peer3 days4-3/+25
| | | | | | | | | | | When a PTK derivation is done as part of PASN authentication flow, a KDK derivation should be done if and only if the higher layer protocol is supported by both parties. Fix the code accordingly, so KDK would be derived if and only if both sides support Secure LTF. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
* Vendor attributes to configure broadcast TWT parametersKiran Kumar Lokere3 days1-0/+32
| | | | | | | Define the new TWT attributes for configuring the broadcast TWT parameters in enum qca_wlan_vendor_attr_twt_setup. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* Add vendor reason codes for TWT setup reject on roaming/channel switchMohammad Asaad Akram3 days1-0/+6
| | | | | | | | The firmware rejects the TWT setup request when roaming and channel switch is in progress. Extend enum qca_wlan_vendor_twt_status to represent new reason codes for these cases. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* Set last_eapol_matches_bssid=1 on a roam+auth indication from driverSunil Dutt3 days1-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 3ab35a660364 ("Extend EAPOL frames processing workaround for roaming cases") added a work around to address the issue of EAPOL frame reception after reassociation replied to with an incorrect destination address (the BSSID of the old AP). This is due to association events and EAPOL RX events being reordered for the roaming cases with drivers that perform BSS selection internally. This mechanism relies on the fact that the driver always forwards the EAPOL handshake to wpa_supplicant after the roaming (sets last_eapol_matches_bssid during the EAPOL processing and resets on the assoc/reassoc indication). The above approach does not address the case where the driver does the EAPOL handshake on the roam, indicating the authorized status to wpa_supplicant but also forwards the EAPOL handshake to wpa_supplicant for few other roam attempts. This is because the flag last_eapol_matches_bssid is not set with the roam+authorized event from the driver. Thus, the next reorder of roam and EAPOL RX events would miss this workaround. Address this by setting last_eapol_matches_bssid=1 on a roam+authorized event from the driver. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* SAE: Increment the Sc counter before generating each ConfirmJouni Malinen3 days1-2/+2
| | | | | | | | | | | | | This changes the Send-Confirm value for the first SAE Confirm message to be 1 instead of 0 for all cases to match the design shown in IEEE Std 802.11-2020, Figure 12-4 (SAE finite state machine). Sc is defined to be "the number of SAE Confirm messages that have been sent" which is a bit vague on whether the current frame is included in the count or not. However, the state machine is showing inc(Sc) operation in all cases before the "2" event to build the Confirm. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* tests: Update SAE test vector to IEEE Std 802.11-2020Jouni Malinen3 days1-82/+49
| | | | Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* nl80211: Support larger number of MAC ACL entriesYu Wang13 days1-7/+29
| | | | | | | | | | | | | If the maximum size of MAC ACL entries is large enough, the configuration message may exceed the default buffer size of a netlink message which is allocated with nlmsg_alloc(), and result in a failure when putting the attributes into the message. To fix this, calculate the required buffer size of the netlink message according to MAC ACL size and allocate a sufficiently large buffer with nlmsg_alloc_size(). Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* nl80211: Fix the size of the maximum MAC ACL sizeYu Wang13 days1-1/+1
| | | | | | | | | | | NL80211_ATTR_MAC_ACL_MAX is a u32 attribute to advertise the maximum number of MAC addresses that a device can support for MAC ACL. This was incorrectly used as a u8 attribute which would not work with any values larger than 255 or on big endian CPUs. Fix this by moving from nla_get_u8() to nla_get_u32(). Fixes: 3c4ca36330c0 ("hostapd: Support MAC address based access control list") Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* tests: Multi-AP and WPS parameter updateJouni Malinen2021-03-281-1/+11
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: WPS Registrar init errorsJouni Malinen2021-03-281-1/+15
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* WPS: Share a single error handling path in wps_set_ie()Jouni Malinen2021-03-281-26/+14
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: WPS PBC session overlap workaroundJouni Malinen2021-03-281-0/+37
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: WPS ER and UNSUBSCRIBE errorsJouni Malinen2021-03-281-0/+40
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: WPS ER and HTTP client timeoutJouni Malinen2021-03-281-2/+13
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: assoc+auth driver eventJouni Malinen2021-03-283-0/+181
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: IEEE 802.1X and FORCE_UNAUTH stateJouni Malinen2021-03-282-0/+30
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* hostapd: Enable WMM automatically when HE is configuredLavanya Suresh2021-03-251-2/+4
| | | | | | | | | If WMM is not set explicitly in the configuration, it can be set based on HT/HE config. As HE can be used without HT/VHT (which was introduced as a special behavior for the 6 GHz band), add a similar automatic enabling of WMM for HE without HT. Signed-off-by: Lavanya Suresh <lavaks@codeaurora.org>
* tests: P2P peer table limitJouni Malinen2021-03-251-0/+51
| | | | Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* tests: INTERFACE_ADD behavior on driver init failureJouni Malinen2021-03-251-0/+8
| | | | Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* Flush pending control interface message for an interface to be removedJouni Malinen2021-03-257-20/+66
| | | | | | | | | | | | | | | | | wpa_supplicant_ctrl_iface_deinit() was executed only if the per-interface control interface initialization had been completed. This is not the case if driver initialization fails and that could result in leaving behind references to the freed wpa_s instance in a corner case where control interface messages ended up getting queued. Fix this by calling wpa_supplicant_ctrl_iface_deinit() in all cases to cancel the potential eloop timeout for wpas_ctrl_msg_queue_timeout with the reference to the wpa_s pointer. In addition, flush any pending message from the global queue for this interface since such a message cannot be of use after this and there is no need to leave them in the queue until the global control interface gets deinitialized. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* tests: FT with beacon protectionJouni Malinen2021-03-251-3/+13
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: OCV testing with AP special functionality set after ENABLEJouni Malinen2021-03-251-7/+50
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: WPA2-PSK AP and GTK rekey failureJouni Malinen2021-03-251-0/+16
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: WNM-Sleep Mode exit with PMF and beacon protectionJouni Malinen2021-03-251-2/+35
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* Fix WNM-Sleep Mode exit debug print of BIGTKJouni Malinen2021-03-251-1/+1
| | | | | | | | Previous debug print used IGTK instead of BIGTK, so fix that to use the correct key. Actual generation of the BIGTK subelement itself was using the correct key, though, so this is only needed to fix the debug print. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Re-enable op class 118-120 tests with new regdbJouni Malinen2021-03-251-3/+3
| | | | | | | Move from RS to PA country code to allow these test cases to work since regdb was updated to require DFS for these operating classes in RS. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: hostapd configuration with op_classJouni Malinen2021-03-231-17/+52
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: DPP PFS error casesJouni Malinen2021-03-231-0/+19
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: MSCSJouni Malinen2021-03-221-0/+231
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* MSCS: Fix MSCS Response frame Status field parsingJouni Malinen2021-03-221-1/+1
| | | | | | | | This is a 2 octet field, so need to use WPA_GET_LE16() here instead of using only the first octet of the value. Fixes: bbd3178af45b ("MSCS: Add support to process MSCS Response frames") Signed-off-by: Jouni Malinen <j@w1.fi>
* Add REGISTER_FRAME hostapd control interface command for testing purposesJouni Malinen2021-03-224-0/+70
| | | | | | | This can be used to register reception of new types of Management frames through nl80211. Signed-off-by: Jouni Malinen <j@w1.fi>
* Allow AP mode extended capabilities to be overriddenJouni Malinen2021-03-223-1/+35
| | | | | | | | | The new hostapd configuration parameters ext_capa_mask and ext_capa can now be used to mask out or add extended capability bits. While this is not without CONFIG_TESTING_OPTIONS, the main use case for this is for testing purposes. Signed-off-by: Jouni Malinen <j@w1.fi>
* Make hostapd_config_fill() easier to auto indentJouni Malinen2021-03-221-3/+4
| | | | | | | | | The conditional compilation block with only the opening brace included in two variants was messing up auto indentation in emacs. Work around this by defining the maximum value conditionally while leave the if block outside any conditional building rules. Signed-off-by: Jouni Malinen <j@w1.fi>
* Simplify extended capability determination in AP modeJouni Malinen2021-03-221-62/+2
| | | | | | | | There is no need to determine the exact length of the element before filling in the octets since this function is already capable of truncated the fields based on what the actual values are. Signed-off-by: Jouni Malinen <j@w1.fi>
* PASN: Use a helper function to free radio work dataJouni Malinen2021-03-211-8/+12
| | | | | | | This is safer in avoiding memory leaks now that there is a dynamically allocated member within the data struct. Signed-off-by: Jouni Malinen <j@w1.fi>
* PASN: Mark pubkey/comeback arguments constant for frame constructionJouni Malinen2021-03-213-5/+5
| | | | | | These parameters are only copied to the frame, so mark them as constant. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Add PASN tests with comeback flowIlan Peer2021-03-211-0/+122
| | | | Signed-off-by: Ilan Peer <ilan.peer@intel.com>
* PASN: Add support for comeback flow to wpa_supplicantIlan Peer2021-03-213-16/+124
| | | | | | | | Process the received comeback cookie and retry automatically if the AP allows this. Otherwise, provide the cookie to upper layers to allow a later attempt with the cookie. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
* PASN: Add support for comeback flow in AP modeIlan Peer2021-03-215-7/+97
| | | | | | | Reuse the SAE anti-clogging token implementation to support similar design with the PASN comeback cookie. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
* tests: DPP NFC operation failures in hostapdJouni Malinen2021-03-211-0/+34
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: DPP bootstrapping via NFC URI record (hostapd reading tag)Jouni Malinen2021-03-212-2/+29
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: DPP GAS Query error cases with hostapdJouni Malinen2021-03-211-3/+293
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* DPP: Fix GAS client error case handling in hostapdJouni Malinen2021-03-211-1/+2
| | | | | | | | | | | | | | The GAS client processing of the response callback for DPP did not properly check for GAS query success. This could result in trying to check the Advertisement Protocol information in failure cases where that information is not available and that would have resulted in dereferencing a NULL pointer. Fix this by checking the GAS query result before processing with processing of the response. This is similar to the earlier wpa_supplicant fix in commit 931f7ff65609 ("DPP: Fix GAS client error case handling"). Signed-off-by: Jouni Malinen <j@w1.fi>