summaryrefslogtreecommitdiff
path: root/src/settings/plugins/ifcfg-rh/reader.c
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2012-07-23 10:39:05 -0400
committerDan Winship <danw@gnome.org>2012-07-23 12:52:32 -0400
commit3324bd2cdfffb65bee52370bd1046814e367c212 (patch)
treec1006ce848e0398de56e8e02e8fa61b5a98aa992 /src/settings/plugins/ifcfg-rh/reader.c
parentaa72d272efb8e74b5ae32b0eb39200d5d2a37910 (diff)
downloadNetworkManager-3324bd2cdfffb65bee52370bd1046814e367c212.tar.gz
ifcfg-rh: ignore IP config on bond slaves
NM was requiring that bond slaves have either no IP config or an explicit "none"/"disabled" config. But the system scripts just ignore any IP config that is present on a slave, so change NM to do that too (but warn about it). https://bugzilla.redhat.com/show_bug.cgi?id=838907
Diffstat (limited to 'src/settings/plugins/ifcfg-rh/reader.c')
-rw-r--r--src/settings/plugins/ifcfg-rh/reader.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/settings/plugins/ifcfg-rh/reader.c b/src/settings/plugins/ifcfg-rh/reader.c
index a2b08e4f98..6aa97f1809 100644
--- a/src/settings/plugins/ifcfg-rh/reader.c
+++ b/src/settings/plugins/ifcfg-rh/reader.c
@@ -4087,6 +4087,9 @@ connection_from_file (const char *filename,
g_object_unref (connection);
connection = NULL;
goto done;
+ } else if (s_ip6 && utils_ignore_ip_config (connection)) {
+ PLUGIN_WARN (IFCFG_PLUGIN_NAME, " warning: ignoring IP6 configuration");
+ g_object_unref (s_ip6);
} else if (s_ip6) {
const char *method;
@@ -4096,14 +4099,14 @@ connection_from_file (const char *filename,
can_disable_ip4 = TRUE;
}
- if (utils_disabling_ip4_config_allowed (connection))
- can_disable_ip4 = TRUE;
-
s_ip4 = make_ip4_setting (parsed, network_file, iscsiadm_path, can_disable_ip4, &error);
if (error) {
g_object_unref (connection);
connection = NULL;
goto done;
+ } else if (s_ip4 && utils_ignore_ip_config (connection)) {
+ PLUGIN_WARN (IFCFG_PLUGIN_NAME, " warning: ignoring IP4 configuration");
+ g_object_unref (s_ip4);
} else if (s_ip4)
nm_connection_add_setting (connection, s_ip4);