-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hostap: Fix wrong security printing about WPA3 PWE #83779
Open
MaochenWang1
wants to merge
1
commit into
zephyrproject-rtos:main
Choose a base branch
from
nxp-upstream:main_mc_fix_wifi_status_pwe
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
hostap: Fix wrong security printing about WPA3 PWE #83779
MaochenWang1
wants to merge
1
commit into
zephyrproject-rtos:main
from
nxp-upstream:main_mc_fix_wifi_status_pwe
+21
−10
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'wifi status' CMD shows wrong security information when STA connects to Ext-AP with WIFI_SECURITY_TYPE_SAE_HNP, after connection using WIFI_SECURITY_TYPE_SAE_AUTO. Setting sae_pwe for all the WPA3 SAE types can fix this issue. Signed-off-by: Maochen Wang <[email protected]>
jukkar
reviewed
Jan 10, 2025
Comment on lines
-1024
to
+1025
params->security == WIFI_SECURITY_TYPE_SAE_H2E || | ||
params->security == WIFI_SECURITY_TYPE_SAE_AUTO) { | ||
params->security == WIFI_SECURITY_TYPE_SAE_H2E || | ||
params->security == WIFI_SECURITY_TYPE_SAE_AUTO) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not introduce no-op changes, the change looks actually wrong here becase indentation is now wrong.
krish2718
reviewed
Jan 10, 2025
Comment on lines
+1050
to
+1066
switch (params->security) { | ||
case WIFI_SECURITY_TYPE_SAE_HNP: | ||
sae_pwe = 0; | ||
break; | ||
case WIFI_SECURITY_TYPE_SAE_H2E: | ||
sae_pwe = 1; | ||
break; | ||
case WIFI_SECURITY_TYPE_SAE_AUTO: | ||
sae_pwe = 2; | ||
break; | ||
default: | ||
sae_pwe = 0; | ||
break; | ||
} | ||
|
||
if (!wpa_cli_cmd_v("set sae_pwe %d", sae_pwe)) { | ||
goto out; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
index 1bd8edb857c..47035749706 100644
--- a/modules/hostap/src/supp_api.c
+++ b/modules/hostap/src/supp_api.c
@@ -1045,14 +1045,13 @@ static int wpas_add_and_config_network(struct wpa_supplicant *wpa_s,
}
}
- if (params->security == WIFI_SECURITY_TYPE_SAE_H2E ||
- params->security == WIFI_SECURITY_TYPE_SAE_AUTO) {
- if (!wpa_cli_cmd_v("set sae_pwe %d",
- (params->security == WIFI_SECURITY_TYPE_SAE_H2E)
- ? 1
- : 2)) {
- goto out;
- }
+ if (!wpa_cli_cmd_v("set sae_pwe %d",
+ (params->security == WIFI_SECURITY_TYPE_SAE_H2E)
+ ? 1
+ : (params->security == WIFI_SECURITY_TYPE_SAE_AUTO)
+ ? 2
+ : 0)) {
+ goto out;
}
if (!wpa_cli_cmd_v("set_network %d key_mgmt SAE%s", resp.network_id,
Isn't this a simpler change?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
'wifi status' CMD shows wrong security information when STA connects to Ext-AP with WIFI_SECURITY_TYPE_SAE_HNP, after connection using WIFI_SECURITY_TYPE_SAE_AUTO. Setting sae_pwe for all the WPA3 SAE types can fix this issue.