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.
This commit is contained in:
Dan Winship 2014-05-29 13:54:50 -04:00
parent f229f4e201
commit 950525f5c3

View file

@ -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;
}