summary refs log tree commit diff
path: root/clients
diff options
context:
space:
mode:
Diffstat (limited to 'clients')
-rw-r--r--clients/Makefile.am1
-rw-r--r--clients/Makefile.in1
-rw-r--r--clients/cli/Makefile.am1
-rw-r--r--clients/cli/Makefile.in1
-rw-r--r--clients/cli/connections.c59
-rw-r--r--clients/cli/settings.c31
-rw-r--r--clients/tui/Makefile.am1
-rw-r--r--clients/tui/Makefile.in1
8 files changed, 61 insertions, 35 deletions
diff --git a/clients/Makefile.am b/clients/Makefile.am
index 9c30eea1..4a526a65 100644
--- a/clients/Makefile.am
+++ b/clients/Makefile.am
@@ -8,7 +8,6 @@ AM_CPPFLAGS = \
 	-I${top_srcdir}/libnm \
 	-I${top_builddir}/libnm \
 	$(GLIB_CFLAGS) \
-	-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
 	-DNMLOCALEDIR=\"$(datadir)/locale\"
 
 bin_PROGRAMS = nm-online
diff --git a/clients/Makefile.in b/clients/Makefile.in
index 243cd149..a34052e7 100644
--- a/clients/Makefile.in
+++ b/clients/Makefile.in
@@ -499,7 +499,6 @@ AM_CPPFLAGS = \
 	-I${top_srcdir}/libnm \
 	-I${top_builddir}/libnm \
 	$(GLIB_CFLAGS) \
-	-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
 	-DNMLOCALEDIR=\"$(datadir)/locale\"
 
 nm_online_SOURCES = nm-online.c
diff --git a/clients/cli/Makefile.am b/clients/cli/Makefile.am
index dfcb1e96..7edbefad 100644
--- a/clients/cli/Makefile.am
+++ b/clients/cli/Makefile.am
@@ -15,7 +15,6 @@ AM_CPPFLAGS = \
 	-I${top_srcdir}/clients/common \
 	$(GLIB_CFLAGS) \
 	-DG_LOG_DOMAIN=\""nmcli"\" \
-	-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
 	-DNMCLI_LOCALEDIR=\"$(datadir)/locale\"
 
 nmcli_SOURCES = \
diff --git a/clients/cli/Makefile.in b/clients/cli/Makefile.in
index 9aa4aa49..d26384e1 100644
--- a/clients/cli/Makefile.in
+++ b/clients/cli/Makefile.in
@@ -480,7 +480,6 @@ with_valgrind = @with_valgrind@
 @BUILD_NMCLI_TRUE@	-I${top_builddir}/libnm \
 @BUILD_NMCLI_TRUE@	-I${top_srcdir}/clients/common \
 @BUILD_NMCLI_TRUE@	$(GLIB_CFLAGS) -DG_LOG_DOMAIN=\""nmcli"\" \
-@BUILD_NMCLI_TRUE@	-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
 @BUILD_NMCLI_TRUE@	-DNMCLI_LOCALEDIR=\"$(datadir)/locale\" \
 @BUILD_NMCLI_TRUE@	$(am__append_1)
 @BUILD_NMCLI_TRUE@nmcli_SOURCES = agent.c agent.h common.c common.h \
diff --git a/clients/cli/connections.c b/clients/cli/connections.c
index 129a5298..3fca37f5 100644
--- a/clients/cli/connections.c
+++ b/clients/cli/connections.c
@@ -4768,43 +4768,46 @@ complete_slave (NMSettingConnection *s_con,
                 gboolean ask,
                 GError **error)
 {
-		char *master_ask = NULL;
-		const char *checked_master = NULL;
+	char *master_ask = NULL;
+	const char *checked_master = NULL;
 
-		if (type)
-			g_print (_("Warning: 'type' is ignored. "
-			           "Use 'nmcli connection add \"%s\" ...' instead."),
-			           type);
-
-		if (nm_setting_connection_get_master (s_con)) {
-			/* Master already set. */
-			if (master) {
-				g_set_error_literal (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT,
-				                     _("Error: redundant 'master' option."));
-				return FALSE;
-			}
-			return TRUE;
-		}
+	if (type)
+		g_print (_("Warning: 'type' is ignored. "
+		           "Use 'nmcli connection add \"%s\" ...' instead."),
+		           type);
 
-		if (!master && ask)
-			master = master_ask = nmc_readline (PROMPT_MASTER);
-		if (!master) {
+	if (nm_setting_connection_get_master (s_con)) {
+		/* Master already set. */
+		if (master) {
 			g_set_error_literal (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT,
-			                     _("Error: 'master' is required."));
+			                     _("Error: redundant 'master' option."));
 			return FALSE;
 		}
-		/* Verify master argument */
-		checked_master = normalized_master_for_slave (all_connections, master, slave_type, NULL);
-
-		/* Change properties in 'connection' setting */
 		g_object_set (s_con,
-		              NM_SETTING_CONNECTION_MASTER, checked_master,
 		              NM_SETTING_CONNECTION_SLAVE_TYPE, slave_type,
 		              NULL);
+		return TRUE;
+	}
 
-		g_free (master_ask);
+	if (!master && ask)
+		master = master_ask = nmc_readline (PROMPT_MASTER);
+	if (!master) {
+		g_set_error_literal (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT,
+		                     _("Error: 'master' is required."));
+		return FALSE;
+	}
+	/* Verify master argument */
+	checked_master = normalized_master_for_slave (all_connections, master, slave_type, NULL);
 
-		return TRUE;
+	/* Change properties in 'connection' setting */
+	g_object_set (s_con,
+	              NM_SETTING_CONNECTION_MASTER, checked_master,
+	              NM_SETTING_CONNECTION_SLAVE_TYPE, slave_type,
+	              NULL);
+
+	g_free (master_ask);
+
+	return TRUE;
 }
 
 static gboolean
@@ -7041,7 +7044,7 @@ do_connection_add (NmCli *nmc, int argc, char **argv)
 	              NM_SETTING_CONNECTION_TYPE, setting_name,
 	              NM_SETTING_CONNECTION_AUTOCONNECT, auto_bool,
 	              NM_SETTING_CONNECTION_INTERFACE_NAME, ifname,
-		      NM_SETTING_CONNECTION_MASTER, checked_master,
+	              NM_SETTING_CONNECTION_MASTER, checked_master,
 	              NM_SETTING_CONNECTION_SLAVE_TYPE, slave_type,
 	              NULL);
 	g_free (uuid);
diff --git a/clients/cli/settings.c b/clients/cli/settings.c
index 3fb841a1..06e9fb47 100644
--- a/clients/cli/settings.c
+++ b/clients/cli/settings.c
@@ -1150,8 +1150,19 @@ nmc_property_bond_get_options (NMSetting *setting, NmcPropertyGetType get_type)
 	bond_options_s = g_string_new (NULL);
 	for (i = 0; i < nm_setting_bond_get_num_options (s_bond); i++) {
 		const char *key, *value;
+		gs_free char *tmp_value = NULL;
+		char *p;
 
 		nm_setting_bond_get_option (s_bond, i, &key, &value);
+
+		if (nm_streq0 (key, NM_SETTING_BOND_OPTION_ARP_IP_TARGET)) {
+			value = tmp_value = g_strdup (value);
+			for (p = tmp_value; p && *p; p++) {
+				if (*p == ',')
+					*p = ' ';
+			}
+		}
+
 		g_string_append_printf (bond_options_s, "%s=%s,", key, value);
 	}
 	g_string_truncate (bond_options_s, bond_options_s->len-1);  /* chop off trailing ',' */
@@ -3651,10 +3662,28 @@ _validate_bond_option_value (const char *option, const char *value, GError **err
 	return value;
 }
 
+static gboolean
+_bond_add_option (NMSettingBond *setting,
+                  const char *name,
+                  const char *value)
+{
+	gs_free char *tmp_value = NULL;
+	char *p;
+
+	if (nm_streq0 (name, NM_SETTING_BOND_OPTION_ARP_IP_TARGET)) {
+		value = tmp_value = g_strdup (value);
+		for (p = tmp_value; p && *p; p++)
+			if (*p == ' ')
+				*p = ',';
+	}
+
+	return nm_setting_bond_add_option (setting, name, value);
+}
+
 DEFINE_SETTER_OPTIONS (nmc_property_bond_set_options,
                        NM_SETTING_BOND,
                        NMSettingBond,
-                       nm_setting_bond_add_option,
+                       _bond_add_option,
                        nm_setting_bond_get_valid_options,
                        _validate_bond_option_value)
 DEFINE_REMOVER_OPTION (nmc_property_bond_remove_option_options,
diff --git a/clients/tui/Makefile.am b/clients/tui/Makefile.am
index caf792ee..30ed9dde 100644
--- a/clients/tui/Makefile.am
+++ b/clients/tui/Makefile.am
@@ -16,7 +16,6 @@ AM_CPPFLAGS= \
 	$(NEWT_CFLAGS) \
 	$(GUDEV_CFLAGS) \
 	-DG_LOG_DOMAIN=\""nmtui"\" \
-	-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
 	-DLOCALEDIR=\""$(localedir)"\" \
 	$(NULL)
 
diff --git a/clients/tui/Makefile.in b/clients/tui/Makefile.in
index f489995d..82b89bdd 100644
--- a/clients/tui/Makefile.in
+++ b/clients/tui/Makefile.in
@@ -574,7 +574,6 @@ with_valgrind = @with_valgrind@
 @BUILD_NMTUI_TRUE@	$(NEWT_CFLAGS) \
 @BUILD_NMTUI_TRUE@	$(GUDEV_CFLAGS) \
 @BUILD_NMTUI_TRUE@	-DG_LOG_DOMAIN=\""nmtui"\" \
-@BUILD_NMTUI_TRUE@	-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
 @BUILD_NMTUI_TRUE@	-DLOCALEDIR=\""$(localedir)"\" \
 @BUILD_NMTUI_TRUE@	$(NULL)