Skip to content

[connman] Upgrade upstream WiFi plugin to latest. Fixes JB#62992#86

Open
LaakkonenJussi wants to merge 10 commits intosailfishos:masterfrom
LaakkonenJussi:jb62571
Open

[connman] Upgrade upstream WiFi plugin to latest. Fixes JB#62992#86
LaakkonenJussi wants to merge 10 commits intosailfishos:masterfrom
LaakkonenJussi:jb62571

Conversation

@LaakkonenJussi
Copy link
Contributor

@LaakkonenJussi LaakkonenJussi commented Nov 29, 2024

No description provided.

@LaakkonenJussi LaakkonenJussi changed the title WIP: Jb62571 WIP: [connman] Upgrade upstream WiFi plugin to latest. Fixes JB#62992 Dec 17, 2024
@LaakkonenJussi LaakkonenJussi changed the title WIP: [connman] Upgrade upstream WiFi plugin to latest. Fixes JB#62992 [connman] Upgrade upstream WiFi plugin to latest. Fixes JB#62992 Dec 17, 2024
@LaakkonenJussi LaakkonenJussi force-pushed the jb62571 branch 4 times, most recently from d750717 to 6a04942 Compare February 3, 2026 13:10
@LaakkonenJussi LaakkonenJussi force-pushed the jb62571 branch 4 times, most recently from af1b409 to 0bec176 Compare February 12, 2026 13:00
adalessandro and others added 10 commits February 12, 2026 15:02
Implement WPA3-SAE authentication on connman side using wpa_supplicant
backend.

Initially based on Tizen project:

  https://review.tizen.org/git/?p=platform/upstream/connman.git

(cherry picked from commit a088730)
This commit adds support for WPA3-Personal transition mode, which
supports both WPA2-Personal (PSK) and WPA3-Personal (SAE).

Based on the AP accepted key management protocols, connman configures
wpa_supplicant as follows:

* WPA3-Personal-only mode: key_mgmt="SAE" ; ieee80211w=2
* WPA3-Personal transition mode: key_mgmt="SAE WPA-PSK" ; ieee80211w=1

(cherry picked from commit 9a54df5)
In ssid_init(), the pointer members of GSupplicantSSID *ssid was
initialised to point to members of a connman_network, which get
freed and replaced, causing ssid's pointers to point to freed heap
memory. To mitigate this, these members are duplicated and then
freed and along with ssid when no longer needed.

(cherry picked from commit 481d08f)
On WPA3-SAE authentication, wpa_supplicant goes directly from
authenticating to disconnected state if the key was invalid.

The above is currently not handled and the `connect-failed` error is
reported on such cases. In order to make the client agent prompt for a
new password, we need to handle this transition and report the
`invalid-key` error.

(cherry picked from commit 0d5d05f)
The problem is `bss` and `bss->path` can be used after being freed, in
this line:

  g_hash_table_replace(bss_mapping, bss->path, interface);

This is because the following call:

  g_hash_table_replace(network->bss_table, ...)

could call remove_bss(), which will free both `bss->path` and `bss`.

So this commit switches the order of these statements.

Additionally, change `g_hash_table_replace` to `g_hash_table_insert`. We
already checked that `network->group` doesn't exist in
`interface->network_table` at this point.

Co-Authored-By: Chris Johnson <chris.johnson@getcruise.com>

(cherry picked from commit 6bd9759)
This replaces 23b09a8a and enables MFPC independent of AP setting which
is needed for WFA certification, see "Wi-Fi CERTIFIED Protected
Management Frames Test Plan v1.9.pdf", 3.3.2 "STAUT requirements".

Additionally key_mgmt is set independent of AP because roaming between
APs with different AKM, e.g. WPA2 -> WPA3 is not working, since WPA-PSK
is still set from first connection.

wpa_supplicant does not try to connect at all in that case:
    skip RSN IE - key mgmt mismatch
    reject due to mismatch with WPA/WPA2

(cherry picked from commit 5e73b55)
In 9d03c51 the "revert" was done wrong
as it removed something that belonged to upstream changes, for example,
from 9e6cf2f

Return these changes as we already have that commit but the revert was
done wrong.
We can enable building the plugin and control the selection of plugin
with connman.service.
The upper state machine expects to be called in all cases. Do not
silenty eat up the callback.

Reported and tested by John Keeping

Fixes: 8ea2d67 ("service: Complete only after user connection retries")

(cherry picked from commit fe5c143)
clang complains with:

gsupplicant/supplicant.c:1220:10: error: expression which evaluates to zero treated as a null pointer constant of type 'const char *' [-Werror,-Wnon-literal-null-conversion]
                return G_SUPPLICANT_MODE_UNKNOWN;
                       ^~~~~~~~~~~~~~~~~~~~~~~~~
gsupplicant/supplicant.c:1228:10: error: expression which evaluates to zero treated as a null pointer constant of type 'const char *' [-Werror,-Wnon-literal-null-conversion]
                return G_SUPPLICANT_SECURITY_UNKNOWN;
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Return NULL instead of the enum. In both cases the enum is 0, so there
is no change.

(cherry picked from commit dcd775c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants