From 950525f5c31aa454896cee9b4bb9de91cc2cbfc6 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Thu, 29 May 2014 13:54:50 -0400 Subject: [PATCH] devices: don't allow generated master connections to have no IP config nm_device_generate_connection() was allowing connections for master devices to have no IP config, but this didn't really make much sense, since they would just fail at stage3 in that case anyway. Now that we get multiple tries at generating a connection on a device, we can just ignore the device until it has a proper connection. --- src/devices/nm-device.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 5dea3971e1..fb0c9a962e 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -1875,9 +1875,8 @@ nm_device_generate_connection (NMDevice *device) ip6_method = nm_utils_get_ip_config_method (connection, NM_TYPE_SETTING_IP6_CONFIG); if ( g_strcmp0 (ip4_method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED) == 0 && g_strcmp0 (ip6_method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE) == 0 - && !nm_setting_connection_get_master (NM_SETTING_CONNECTION (s_con)) - && !nm_platform_link_supports_slaves (priv->ifindex)) { - nm_log_dbg (LOGD_DEVICE, "(%s): ignoring generated connection (no IP, not master, no slaves)", ifname); + && !nm_setting_connection_get_master (NM_SETTING_CONNECTION (s_con))) { + nm_log_dbg (LOGD_DEVICE, "(%s): ignoring generated connection (no IP and not slave)", ifname); g_object_unref (connection); connection = NULL; }