mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-03 03:30:14 +01:00
nmcli/connections: make sure the connection has a base setting
Do the same bookkeeping as would happen upon setting the "type" option when the connection has a connection.type set upon its addition. Otherwise the --ask mode is sad: $ nmcli --ask c add connection.type team ** nm:ERROR:src/nmcli/connections.c:5648:connection_get_base_meta_setting_type: assertion failed: (base_setting) Bail out! nm:ERROR:src/nmcli/connections.c:5648:connection_get_base_meta_setting_type: assertion failed: (base_setting) Aborted (core dumped)
This commit is contained in:
parent
e3fa6dfd7f
commit
647e255362
1 changed files with 6 additions and 0 deletions
|
|
@ -5891,6 +5891,12 @@ read_properties:
|
|||
if (nmc->complete)
|
||||
goto finish;
|
||||
|
||||
if (!enable_type_settings_and_options(connection, &error)) {
|
||||
g_string_assign(nmc->return_text, error->message);
|
||||
nmc->return_value = error->code;
|
||||
goto finish;
|
||||
}
|
||||
|
||||
/* Now ask user for the rest of the mandatory options. */
|
||||
if (nmc->ask)
|
||||
questionnaire_mandatory(nmc, connection);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue