From: Thomas Haller Date: Wed, 30 Mar 2016 16:33:14 +0000 (+0200) Subject: cli: fix setting 'slave-type' for `nmcli connection add type *-slave` X-Git-Url: https://iam.tj/gitweb/gitweb.cgi?p=NetworkManager.git;a=commitdiff_plain;h=03fd18cde053f2765e057b354e8ca0f751e6e103 cli: fix setting 'slave-type' for `nmcli connection add type *-slave` $ nmcli connection add type bond-slave ifname eth1 con-name bond0.0 master nm-bond Error: Failed to add 'bond0.0' connection: connection.slave-type: Cannot set 'master' without 'slave-type' Fixes: 8ad218e71c3a82d491af6daa516464dd020608f2 --- diff --git a/clients/cli/connections.c b/clients/cli/connections.c index 0158dc25a..3fca37f5a 100644 --- a/clients/cli/connections.c +++ b/clients/cli/connections.c @@ -4783,6 +4783,9 @@ complete_slave (NMSettingConnection *s_con, _("Error: redundant 'master' option.")); return FALSE; } + g_object_set (s_con, + NM_SETTING_CONNECTION_SLAVE_TYPE, slave_type, + NULL); return TRUE; }