diff options
| author | Michael Biebl <biebl@debian.org> | 2019-08-06 22:46:20 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2019-08-06 22:46:20 +0200 |
| commit | 5c79b900b59a5ad162ecc836e424468207ff031e (patch) | |
| tree | 2f529ff5c2d8531a2bf2973d96e316786eee9799 /src/settings/plugins | |
| parent | 2e5fa45ddfbb5cffa1e78221f1cea706e2f298af (diff) | |
New upstream version 1.20.0 upstream/1.20.0
Diffstat (limited to 'src/settings/plugins')
| -rw-r--r-- | src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c | 19 | ||||
| -rw-r--r-- | src/settings/plugins/ifupdown/nms-ifupdown-plugin.c | 2 |
2 files changed, 11 insertions, 10 deletions
diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c index 900a3fc1..9c3ae10a 100644 --- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c +++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c @@ -3629,7 +3629,10 @@ make_wpa_setting (shvarFile *ifcfg, wpa_sae = nm_streq0 (v, "SAE"); wpa_eap = nm_streq0 (v, "WPA-EAP"); ieee8021x = nm_streq0 (v, "IEEE8021X"); - if (!wpa_psk && !wpa_sae && !wpa_eap && !ieee8021x) + if ( !wpa_psk + && !wpa_sae + && !wpa_eap + && !ieee8021x) return NULL; /* Not WPA or Dynamic WEP */ /* WPS */ @@ -3689,11 +3692,13 @@ make_wpa_setting (shvarFile *ifcfg, g_object_set (wsec, NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "wpa-none", NULL); else if (wpa_psk) g_object_set (wsec, NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "wpa-psk", NULL); - else if (wpa_sae) + else { + nm_assert (wpa_sae); g_object_set (wsec, NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "sae", NULL); - else - g_assert_not_reached (); - } else if (wpa_eap || ieee8021x) { + } + } else { + nm_assert (wpa_eap || ieee8021x); + /* Adhoc mode is mutually exclusive with any 802.1x-based authentication */ if (adhoc) { g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_CONNECTION, @@ -3710,10 +3715,6 @@ make_wpa_setting (shvarFile *ifcfg, g_object_set (wsec, NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, lower, NULL); } - } else { - g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_CONNECTION, - "Unknown wireless KEY_MGMT type '%s'", v); - return NULL; } i_val = NM_SETTING_WIRELESS_SECURITY_PMF_DEFAULT; diff --git a/src/settings/plugins/ifupdown/nms-ifupdown-plugin.c b/src/settings/plugins/ifupdown/nms-ifupdown-plugin.c index 93f1813c..475ecbb6 100644 --- a/src/settings/plugins/ifupdown/nms-ifupdown-plugin.c +++ b/src/settings/plugins/ifupdown/nms-ifupdown-plugin.c @@ -321,10 +321,10 @@ load_eni_ifaces (NMSIfupdownPlugin *self) sd_repl = g_hash_table_lookup (eni_ifaces, block->name); if (sd_repl) { - storage = g_steal_pointer (&sd_repl->storage); _LOGD ("parse: replace connection \"%s\" (%s)", block->name, nm_settings_storage_get_uuid (sd_repl->storage)); + storage = g_steal_pointer (&sd_repl->storage); g_hash_table_remove (eni_ifaces, block->name); } |