mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-20 08:10:06 +01:00
settings: ignore unsupported connections when they are loaded
In addition to rejecting new connections added via D-Bus when they are unsupported, also ignore the existing on-disk ones.
This commit is contained in:
parent
247000deed
commit
c1baf09bf9
1 changed files with 16 additions and 4 deletions
|
|
@ -1372,6 +1372,7 @@ _connection_changed_track(NMSettings *self,
|
|||
SettConnEntry *sett_conn_entry;
|
||||
StorageData *sd;
|
||||
const char *uuid;
|
||||
gs_free_error GError *error = NULL;
|
||||
|
||||
nm_assert_valid_settings_storage(NULL, storage);
|
||||
|
||||
|
|
@ -1382,6 +1383,17 @@ _connection_changed_track(NMSettings *self,
|
|||
|| (_nm_connection_verify(connection, NULL) == NM_SETTING_VERIFY_SUCCESS));
|
||||
nm_assert(!connection || nm_streq0(uuid, nm_connection_get_uuid(connection)));
|
||||
|
||||
if (connection && !nm_utils_connection_supported(connection, &error)) {
|
||||
_LOGD("storage[%s," NM_SETTINGS_STORAGE_PRINT_FMT
|
||||
"]: ignoring connection \"%s\" from file \"%s\": %s",
|
||||
uuid,
|
||||
NM_SETTINGS_STORAGE_PRINT_ARG(storage),
|
||||
nm_connection_get_id(connection),
|
||||
nm_settings_storage_get_filename(storage),
|
||||
error->message);
|
||||
connection = NULL;
|
||||
}
|
||||
|
||||
nm_assert_connection_unchanging(connection);
|
||||
|
||||
sett_conn_entry =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue