mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 05:58:01 +02:00
wifi: trust eap methods from profile to be lower-case
NMSetting8021x::verify() checks the string values for eap methods. They must all be non-NULL and are not compared case-insensitive.
This commit is contained in:
parent
1181f88ef1
commit
13d8455a7c
1 changed files with 4 additions and 6 deletions
|
|
@ -1045,10 +1045,7 @@ nm_supplicant_config_add_setting_8021x (NMSupplicantConfig *self,
|
||||||
for (i = 0; i < num_eap; i++) {
|
for (i = 0; i < num_eap; i++) {
|
||||||
const char *method = nm_setting_802_1x_get_eap_method (setting, i);
|
const char *method = nm_setting_802_1x_get_eap_method (setting, i);
|
||||||
|
|
||||||
if (!method)
|
if (nm_streq (method, "fast")) {
|
||||||
continue;
|
|
||||||
|
|
||||||
if (strcasecmp (method, "fast") == 0) {
|
|
||||||
fast = TRUE;
|
fast = TRUE;
|
||||||
priv->fast_required = TRUE;
|
priv->fast_required = TRUE;
|
||||||
}
|
}
|
||||||
|
|
@ -1057,7 +1054,7 @@ nm_supplicant_config_add_setting_8021x (NMSupplicantConfig *self,
|
||||||
if (num_eap == 1) {
|
if (num_eap == 1) {
|
||||||
g_set_error (error, NM_SUPPLICANT_ERROR, NM_SUPPLICANT_ERROR_CONFIG,
|
g_set_error (error, NM_SUPPLICANT_ERROR, NM_SUPPLICANT_ERROR_CONFIG,
|
||||||
"Connection settings managed externally to NM, connection"
|
"Connection settings managed externally to NM, connection"
|
||||||
" cannot be used with wpa_supplicant");
|
" cannot be used with wpa_supplicant");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -1069,7 +1066,8 @@ nm_supplicant_config_add_setting_8021x (NMSupplicantConfig *self,
|
||||||
}
|
}
|
||||||
|
|
||||||
g_string_ascii_up (eap_str);
|
g_string_ascii_up (eap_str);
|
||||||
if (eap_str->len && !nm_supplicant_config_add_option (self, "eap", eap_str->str, -1, NULL, error))
|
if ( eap_str->len
|
||||||
|
&& !nm_supplicant_config_add_option (self, "eap", eap_str->str, -1, NULL, error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/* Adjust the fragment size according to MTU, but do not set it higher than 1280-14
|
/* Adjust the fragment size according to MTU, but do not set it higher than 1280-14
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue