libnm-util: ignore Privacy for APs broadcasting WPA & RSN IEs (rh #445369)

While broadcasting WPA and RSN IEs with the Privacy bit set to 0 is
technically illegal, some networks using older Cisco equipment do it
(I'm looking at you, Eduroam) and there's no reason not to support
it.  Since the AP is broadcasting WPA/RSN IEs, assume that means
WPA and RSN is supported (duh).
This commit is contained in:
Dan Williams
2009-02-06 17:32:56 -05:00
parent ce3473dc90
commit a734c836a5
2 changed files with 0 additions and 13 deletions

View File

@@ -233,9 +233,6 @@ nm_setting_wireless_ap_security_compatible (NMSettingWireless *s_wireless,
if ( !strcmp (key_mgmt, "wpa-psk") if ( !strcmp (key_mgmt, "wpa-psk")
|| !strcmp (key_mgmt, "wpa-eap")) { || !strcmp (key_mgmt, "wpa-eap")) {
if (!(ap_flags & NM_802_11_AP_FLAGS_PRIVACY))
return FALSE;
if (!strcmp (key_mgmt, "wpa-psk")) { if (!strcmp (key_mgmt, "wpa-psk")) {
if ( !(ap_wpa & NM_802_11_AP_SEC_KEY_MGMT_PSK) if ( !(ap_wpa & NM_802_11_AP_SEC_KEY_MGMT_PSK)
&& !(ap_rsn & NM_802_11_AP_SEC_KEY_MGMT_PSK)) && !(ap_rsn & NM_802_11_AP_SEC_KEY_MGMT_PSK))

View File

@@ -904,9 +904,6 @@ nm_utils_security_valid (NMUtilsSecurityType type,
if (!(wifi_caps & NM_WIFI_DEVICE_CAP_WPA)) if (!(wifi_caps & NM_WIFI_DEVICE_CAP_WPA))
return FALSE; return FALSE;
if (have_ap) { if (have_ap) {
if (!(ap_flags & NM_802_11_AP_FLAGS_PRIVACY))
return FALSE;
if (ap_wpa & NM_802_11_AP_SEC_KEY_MGMT_PSK) { if (ap_wpa & NM_802_11_AP_SEC_KEY_MGMT_PSK) {
if ( (ap_wpa & NM_802_11_AP_SEC_PAIR_TKIP) if ( (ap_wpa & NM_802_11_AP_SEC_PAIR_TKIP)
&& (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_TKIP)) && (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_TKIP))
@@ -922,9 +919,6 @@ nm_utils_security_valid (NMUtilsSecurityType type,
if (!(wifi_caps & NM_WIFI_DEVICE_CAP_RSN)) if (!(wifi_caps & NM_WIFI_DEVICE_CAP_RSN))
return FALSE; return FALSE;
if (have_ap) { if (have_ap) {
if (!(ap_flags & NM_802_11_AP_FLAGS_PRIVACY))
return FALSE;
if (ap_rsn & NM_802_11_AP_SEC_KEY_MGMT_PSK) { if (ap_rsn & NM_802_11_AP_SEC_KEY_MGMT_PSK) {
if ( (ap_rsn & NM_802_11_AP_SEC_PAIR_TKIP) if ( (ap_rsn & NM_802_11_AP_SEC_PAIR_TKIP)
&& (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_TKIP)) && (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_TKIP))
@@ -942,8 +936,6 @@ nm_utils_security_valid (NMUtilsSecurityType type,
if (!(wifi_caps & NM_WIFI_DEVICE_CAP_WPA)) if (!(wifi_caps & NM_WIFI_DEVICE_CAP_WPA))
return FALSE; return FALSE;
if (have_ap) { if (have_ap) {
if (!(ap_flags & NM_802_11_AP_FLAGS_PRIVACY))
return FALSE;
if (!(ap_wpa & NM_802_11_AP_SEC_KEY_MGMT_802_1X)) if (!(ap_wpa & NM_802_11_AP_SEC_KEY_MGMT_802_1X))
return FALSE; return FALSE;
/* Ensure at least one WPA cipher is supported */ /* Ensure at least one WPA cipher is supported */
@@ -957,8 +949,6 @@ nm_utils_security_valid (NMUtilsSecurityType type,
if (!(wifi_caps & NM_WIFI_DEVICE_CAP_RSN)) if (!(wifi_caps & NM_WIFI_DEVICE_CAP_RSN))
return FALSE; return FALSE;
if (have_ap) { if (have_ap) {
if (!(ap_flags & NM_802_11_AP_FLAGS_PRIVACY))
return FALSE;
if (!(ap_rsn & NM_802_11_AP_SEC_KEY_MGMT_802_1X)) if (!(ap_rsn & NM_802_11_AP_SEC_KEY_MGMT_802_1X))
return FALSE; return FALSE;
/* Ensure at least one WPA cipher is supported */ /* Ensure at least one WPA cipher is supported */