Skip to content

Commit

Permalink
net: wifi: should enable MFP when connect to WPA3 network
Browse files Browse the repository at this point in the history
Add check that should enable MFP when connect to WPA3 network.

Signed-off-by: Maochen Wang <[email protected]>
  • Loading branch information
MaochenWang1 committed Dec 28, 2024
1 parent 70131af commit 9ddef63
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions subsys/net/l2/wifi/wifi_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,16 @@ static int __wifi_args_to_params(const struct shell *sh, size_t argc, char *argv
return -EINVAL;
}

if (params->security == WIFI_SECURITY_TYPE_SAE_HNP
|| params->security == WIFI_SECURITY_TYPE_SAE_H2E
|| params->security == WIFI_SECURITY_TYPE_SAE_AUTO
|| params->wpa3_ent_mode) {
if (params->mfp != WIFI_MFP_REQUIRED) {
PR_ERROR("MFP is required for WPA3 mode\n");
return -EINVAL;
}
}

if (iface_mode == WIFI_MODE_AP && params->channel == WIFI_CHANNEL_ANY) {
PR_ERROR("Channel not provided\n");
return -EINVAL;
Expand Down

0 comments on commit 9ddef63

Please sign in to comment.