diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2017-09-16 11:59:46 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2017-09-20 09:41:50 +0200 |
commit | dc3cbc60129e58112445721ebd15a629fdaf2da3 (patch) | |
tree | c008314d2025e47631bc92bb935958199973a7f4 | |
parent | 5499dda250856f6e792b9a5cf3c8b6f98713d8f0 (diff) | |
download | NetworkManager-dc3cbc60129e58112445721ebd15a629fdaf2da3.tar.gz |
cli: wifi: connect with PSK when the AP supports WPA-PSK and WPA-EAP
'nmcli device wifi connect' only supports WEP and WPA-PSK at the
moment, but not WPA-EAP. If the AP supports both WPA-PSK and WPA-EAP,
nmcli doesn't add the PSK to the connection, causing a connection
failure. Fix this.
https://bugzilla.redhat.com/show_bug.cgi?id=1492064
(cherry picked from commit 7af471919a25bd20b0f49024e6653da41ece20f0)
-rw-r--r-- | clients/cli/devices.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clients/cli/devices.c b/clients/cli/devices.c index 50983de6f8..f609e1dc9c 100644 --- a/clients/cli/devices.c +++ b/clients/cli/devices.c @@ -3147,8 +3147,8 @@ do_device_wifi_connect_network (NmCli *nmc, int argc, char **argv) NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE, wep_passphrase ? NM_WEP_KEY_TYPE_PASSPHRASE: NM_WEP_KEY_TYPE_KEY, NULL); - } else if ( !(ap_wpa_flags & NM_802_11_AP_SEC_KEY_MGMT_802_1X) - && !(ap_rsn_flags & NM_802_11_AP_SEC_KEY_MGMT_802_1X)) { + } else if ( (ap_wpa_flags & NM_802_11_AP_SEC_KEY_MGMT_PSK) + || (ap_rsn_flags & NM_802_11_AP_SEC_KEY_MGMT_PSK)) { /* WPA PSK */ g_object_set (s_wsec, NM_SETTING_WIRELESS_SECURITY_PSK, password, NULL); } |