mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-02 21:20:37 +01:00
manager: error out on wrong connection passed to AddAndActivate
This commit is contained in:
parent
3c548dd081
commit
c92f9963c8
1 changed files with 8 additions and 5 deletions
|
|
@ -6592,11 +6592,14 @@ impl_manager_add_and_activate_connection(NMDBusObject *obj,
|
|||
* validate_activation_request()).
|
||||
*/
|
||||
incompl_conn = nm_simple_connection_new();
|
||||
if (settings && g_variant_n_children(settings))
|
||||
_nm_connection_replace_settings(incompl_conn,
|
||||
settings,
|
||||
NM_SETTING_PARSE_FLAGS_STRICT,
|
||||
NULL);
|
||||
if (settings && g_variant_n_children(settings)) {
|
||||
if (!_nm_connection_replace_settings(incompl_conn,
|
||||
settings,
|
||||
NM_SETTING_PARSE_FLAGS_STRICT,
|
||||
&error)) {
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
subject = validate_activation_request(self,
|
||||
invocation,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue