ifcfg-rh: move code around in write_8021x_setting()

Makes more sense, to not interrupt the construction of the
phase2_auth string.
This commit is contained in:
Thomas Haller 2022-04-04 17:54:25 +02:00
parent 5f5641d304
commit 91cbbd99b9
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -464,6 +464,14 @@ write_8021x_setting(NMConnection *connection,
}
svSetValueStr(ifcfg, "IEEE_8021X_FAST_PROVISIONING", value);
auth_flags = nm_setting_802_1x_get_phase1_auth_flags(s_8021x);
if (auth_flags != NM_SETTING_802_1X_AUTH_FLAGS_NONE) {
svSetValueEnum(ifcfg,
"IEEE_8021X_PHASE1_AUTH_FLAGS",
nm_setting_802_1x_auth_flags_get_type(),
auth_flags);
}
/* Phase2 auth methods */
phase2_auth = g_string_new(NULL);
@ -484,14 +492,6 @@ write_8021x_setting(NMConnection *connection,
g_free(tmp);
}
auth_flags = nm_setting_802_1x_get_phase1_auth_flags(s_8021x);
if (auth_flags != NM_SETTING_802_1X_AUTH_FLAGS_NONE) {
svSetValueEnum(ifcfg,
"IEEE_8021X_PHASE1_AUTH_FLAGS",
nm_setting_802_1x_auth_flags_get_type(),
auth_flags);
}
svSetValueStr(ifcfg,
"IEEE_8021X_INNER_AUTH_METHODS",
phase2_auth->len ? phase2_auth->str : NULL);