mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-31 23:00:11 +01:00
device: fix check for invalid keys during reapply
Was completely wrong and failed to find first_invalid_key.
As a consequence, hit the assertion at the end.
(cherry picked from commit a51b947f25)
This commit is contained in:
parent
ba3f9879dc
commit
16d0cc332a
1 changed files with 3 additions and 7 deletions
|
|
@ -7178,14 +7178,10 @@ _hash_check_invalid_keys_impl (GHashTable *hash, const char *setting_name, GErro
|
|||
|
||||
g_hash_table_iter_init (&iter, hash);
|
||||
while (g_hash_table_iter_next (&iter, (gpointer *) &k, NULL)) {
|
||||
for (i = 0; argv[i]; i++) {
|
||||
if (!strcmp (argv[i], k)) {
|
||||
first_invalid_key = k;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (first_invalid_key)
|
||||
if (_nm_utils_strv_find_first ((char **) argv, -1, k) < 0) {
|
||||
first_invalid_key = k;
|
||||
break;
|
||||
}
|
||||
}
|
||||
g_set_error (error,
|
||||
NM_DEVICE_ERROR,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue