mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-08 20:00:23 +01:00
core: ensure normalized connection during add-and-activate
nm_connection_verify() returns success for fully valid (normalized) connections and also connections that are NM_SETTING_VERIFY_NORMALIZABLE. We really want to fully normalize the profiles during add-and-activate.
This commit is contained in:
parent
6d4592354f
commit
d1f269ab36
3 changed files with 4 additions and 2 deletions
|
|
@ -5753,7 +5753,7 @@ nm_device_complete_connection (NMDevice *self,
|
|||
error))
|
||||
return FALSE;
|
||||
|
||||
if (!nm_connection_verify (connection, error))
|
||||
if (!nm_connection_normalize (connection, NULL, NULL, error))
|
||||
return FALSE;
|
||||
|
||||
return nm_device_check_connection_compatible (self, connection, error);
|
||||
|
|
|
|||
|
|
@ -5517,6 +5517,8 @@ impl_manager_add_and_activate_connection (NMDBusObject *obj,
|
|||
goto error;
|
||||
}
|
||||
|
||||
nm_assert (_nm_connection_verify (incompl_conn, NULL) == NM_SETTING_VERIFY_SUCCESS);
|
||||
|
||||
active = _new_active_connection (self,
|
||||
is_vpn,
|
||||
NULL,
|
||||
|
|
|
|||
|
|
@ -720,7 +720,7 @@ nm_settings_add_connection_dbus (NMSettings *self,
|
|||
g_return_if_fail (G_IS_DBUS_METHOD_INVOCATION (context));
|
||||
|
||||
/* Connection must be valid, of course */
|
||||
if (!nm_connection_verify (connection, &tmp_error)) {
|
||||
if (_nm_connection_verify (connection, &tmp_error) != NM_SETTING_VERIFY_SUCCESS) {
|
||||
error = g_error_new (NM_SETTINGS_ERROR,
|
||||
NM_SETTINGS_ERROR_INVALID_CONNECTION,
|
||||
"The connection was invalid: %s",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue