Allow SAE password identifiers to be provisioned to Enrollees that
indicate support for this capability.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
DPP supports provisioning of SAE password identifiers to uniquely
identify a password if the enrollee indicates support for them. Indicate
Enrollee support for that and add the received value into the network
profile.
I put everything under defines for CONFIG_DPP3 as this is a bleeding
edge feature in DPP.
This was tested against my DPP reference implementation acting as the
Configurator.
Signed-off-by: Dan Harkins <dharkins@lounge.org>
We got connection failures because of outdated channel information.
That's because the NL80211_CMD_REG_CHANGE event is important for all
interfaces.
Commit f136837202 ("nl80211: Pass wiphy events to all affected
interfaces") skips the early termination for events directed to a wiphy,
but that doesn't cover the regulatory change event because it doesn't
have a wiphy set either. Therefore the early termination still kicks in
and from three interfaces, only one got the updated channel list.
Fix this by changing the early termination logic to only apply to events
directed either to a specific interface index for wdev.
Signed-off-by: Dominik Cermak <dominik.cermak@joynext.com>
The way this was checked previously used pointer arithmetic could result
in undefined behavior due to the pointer ending up pointing more than
one byte beyond the end of the buffer. Avoid this by checking the buffer
length before incrementing the pointer.
Fixes: bcbe80a66a ("AP: MLO: Handle Multi-Link element during authentication")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
The driver is expected to have an STA entry for a non-AP MLD ready to
translate the address fields for SAE confirm messages. However, there is
at least a theoretical race condition in a case where the peer sends the
SAE confirm message quickly enough for the driver translation mechanism
to not be available to update the SAE confirm message addresses. Work
around that by searching for the STA entry using the link address of the
non-AP MLD if no match is found based on the MLD MAC address.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
Add a simple test case to bring up a two link AP MLD and get the status
of each link via the MLD level control socket.
Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
With MLO, each link have socket created with "<ifname>_link<link id>"
under the control interface directory.
Introduce a MLD level socket "<ifname>" as well under the same control
interface directory. This socket can be used to pass the command to its
partner links directly instead of using the link level socket. Link ID
needs to be passed with the command in a prefix way. If no Link ID is
provided the first link ID is selected.
The structure of the command is -
"LINKID <link id> <COMMAND APPLICABALE FOR THE LINK>"
Directory looks something like this -
$ ls /var/run/hostapd/
wlan0
wlan0_link0
wlan0_link1
wlan0 here is the MLD level socket. Rest are each link level sockets.
This also helps to maintain backwards compatibility with applications
which looks for <ifname> under the control interface directory.
Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
With MLO, each BSS will create sockets under the given ctrl_iface
directory with the socket name being '<ifname>_link<link_ID>'.
Make necessary changes in MLO related test cases so that it can access
the new socket and proceed further as expected.
Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
Create link based control sockets to access the link based commands
through hostapd_cli. This will create the link interfaces in the name of
<ifname>_link<X>
Example:
To fetch link 0 status from wlan0, below command can be used -
$ hostapd_cli -i wlan0 -l 0 status
On failure of link/interface selection, below error will be observed
$ hostapd_cli -i wlan0 -l 2 status
Failed to connect to hostapd - wpa_ctrl_open: No such file or directory
Signed-off-by: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
Co-developed-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
This is needed to avoid false failures if an old BSS entry is still
present for dev[0]. This could happen, e.g., with the following test
case sequence: wpas_mesh_max_peering wifi_display_parsing
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
Wait longer for the disconnection event since the previous wait was
exactly the same length as the authentication timeout in wpa_supplicant
and as such, subject to race conditions.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
Check explicitly that wfd_subelems is present in the dict instead of
failing on a key error when trying to fetch it.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This separates the control interface specific generation of a text event
message away from the main implementation of USD and makes it more
convenient to add support for other control interface mechanisms like
dbus.
Signed-off-by: Lo,Chin-Ran <chin-ran.lo@nxp.com>
Add the QCA_NL80211_VENDOR_SUBCMD_SET_P2P_MODE for setting the P2P mode
in which the P2P Group Owner (GO) should be brought up. These modes
include Wi-Fi Direct R1 only, Wi-Fi Direct R2 only, and P2P Connection
Compatibility Mode, which supports both R1 and R2. These modes are
defined in the enum qca_wlan_vendor_p2p_mode.
Signed-off-by: Vinay Gannevaram <quic_vganneva@quicinc.com>
Add new QCA vendor attribute to configure the P2P GO beacon interval
dynamically while the BSS continues operating.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
Add support for P2P2 bootstrapping with comeback mechanism using
Provision Discovery frames. Extend the control interface command
P2P_CONNECT to allow P2P2 bootstrapping handshake.
Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
Parse the P2P IEs in functions that handle provision discovery request
and response. Process the frames based on the IEs received in the PD
frames. This makes it easier to extend PD for P2P2 cases.
Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
Process the Element Container attribute from NAN SDF frames and check if
P2P attributes are present. Add a P2P peer device entry if the NAN SDF
frame has matching service and P2P capabilities.
Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
Add frequency list to active NAN USD Subscriber to search for a
Publisher on multiple channels. This is the publish channel list used by
the Subscriber to periodically search for a service on these channels.
publishChannelList was already supported in the Publisher and this
commit extends that to the Subscriber.
This is needed for a P2P2 seeker that is an active subscriber looking
for an advertiser on a list of publish channels.
Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
Generate a random device identity key and save it to the config file.
Use the same identity key from config to derive DIRA for NAN SDF frames.
Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
This was missing a newline at the end of the line.
Fixes: 8fa52a7974 ("FT: Allow wpa_supplicant to be configured to prepend PMKR1Name")
Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
Add DIRA attribute in P2P2 IE of NAN Subscribe and Publish frames
to enable support for device identity of paired peers.
Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
Add PCEA and PBMA attribute in P2P2 IE of NAN Subscribe and Publish frames
to include the P2P2 capabilities and bootstrapping methods.
Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
Extend the NAN Subscribe and Publish methods to allow p2p=1 to be
specified to include P2P attributes in a P2P IE to be added into the NAN
Element Container attribute. In addition, use the P2P Device Address for
the NAN SDFs for the P2P cases.
Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
Support implementation architecture where the NAN discovery engine is
located in the driver/firmware instead of wpa_supplicant.
Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
While these elements fit without issue in production use cases, it is
possible to override the elements for testing purposes and if such
overridden elements are overly long, they would nto fit into the maximum
length RSN Override Link KDE. This could result in difficult to debug
failure cases, so check for this explicitly and instead of sending out
the invalid M3, report the internal issue in the debug log and do not
send M3.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
Elements can actually be 257 octets long (2 octets of header followed by
255 octets of payload). The maximum length for various IE override
testing parameters had somehow ended up being one octet too short to
cover the maximum. Increase this to allow the maximum element length to
be reached for testing purposes.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
These test cases could fail if they happened to be executed after a test
case that set a specific SAE group.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
When the PASN implementation is used as a library for Wi-Fi Aware
applications there is need to allow the Responder to set the noauth
parameter to support opportunistic pairing method using PASN AKMP. Add
pasn_set_noauth() to address this.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
When the PASN implementation is used as a library for Wi-Fi Aware
applications there is need to reject the PASN auth 1 frame based on the
user input. Add support to send PASN auth 2 with failure status for
auth 1 frame received to address this need.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
The restriction of the passphrase length to 8..63 characters is only
applicable for WPA2-Personal (PSK). Remove this constraint when
processing a configuration object that includes SAE without PSK.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
The restriction of the passphrase length to 8..63 characters is only
applicable for WPA2-Personal (PSK). Remove this constraint when
provisioning a configuration object that includes SAE without PSK.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
Always set SNonce cookie and enable RSN Override elements validation
irrespective of the RSN Selection element usage in (Re)Association
Request frame when RSN overriding supported.
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
STA needs to skip validating RSN Override elements when RSN overriding
is not used since AP will not send RSN Override elements in EAPOL-Key
message 3/4. This is handled correctly in non-MLO case but in MLO case
wpa_supplicant always validates RSN Override link KDEs. Fix validating
RSN Override elements in MLO case as well.
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
A STA that supports RSN overriding will always use the SNonce cookie. An
AP that does not advertise RSN overriding elements must not enforce that
SNonce cookie is used with RSN Selection element since a STA includes
the latter only when it sees the AP advertising RSN overriding elements.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
Modify wpa_supplicant code based on the updated driver interface for RSN
overriding capability indication.
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Be more specific on how the QCA_WLAN_VENDOR_ATTR_FEATURE_FLAGS attribute
is used in the response.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
Add QCA_NL80211_VENDOR_SUBCMD_CONNECT_EXT to send additional information
such as RSN overriding support of the supplicant for the (re)association
attempts with NL80211_CMD_CONNECT.
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Use separate interfaces for indicating driver and supplicant RSN
overriding support. Modifying this interface is fine since this feature
is still under development.
Subsequent commit will define the interface for indicating supplicant
RSN overriding support to the driver.
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
wpa_auth_get_seqnum() for ML group rekeying needs to be skipped in the
same way as it is done for non-ML cases to avoid indicating old values
and resulting in group frames being dropped as replays. The simple check
for gsm->wpa_group_state != WPA_GROUP_SETKEYS (as is done for non-ML) is
not sufficient for this since the per-link Authenticator states are not
strictly synchronized and the state change happens in the middle of this
step.
Fixes: 137b855092 ("MLO: Mechanism for fetching group key information for the links")
Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>