device: assume connections for device with slaves
If a bridge/team/bond has slaves, assume it's connected. Recheck as devices appear. https://bugzilla.redhat.com/show_bug.cgi?id=1141266
This commit is contained in:
@@ -1404,6 +1404,7 @@ nm_device_master_add_slave (NMDevice *self, NMDevice *slave, gboolean configure)
|
|||||||
G_CALLBACK (slave_state_changed), self);
|
G_CALLBACK (slave_state_changed), self);
|
||||||
priv->slaves = g_slist_append (priv->slaves, info);
|
priv->slaves = g_slist_append (priv->slaves, info);
|
||||||
}
|
}
|
||||||
|
nm_device_queue_recheck_assume (self);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -1989,8 +1990,9 @@ nm_device_generate_connection (NMDevice *self, NMDevice *master)
|
|||||||
ip6_method = nm_utils_get_ip_config_method (connection, NM_TYPE_SETTING_IP6_CONFIG);
|
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
|
if ( g_strcmp0 (ip4_method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED) == 0
|
||||||
&& g_strcmp0 (ip6_method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE) == 0
|
&& g_strcmp0 (ip6_method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE) == 0
|
||||||
&& !nm_setting_connection_get_master (NM_SETTING_CONNECTION (s_con))) {
|
&& !nm_setting_connection_get_master (NM_SETTING_CONNECTION (s_con))
|
||||||
_LOGD (LOGD_DEVICE, "ignoring generated connection (no IP and not slave)");
|
&& !priv->slaves) {
|
||||||
|
_LOGD (LOGD_DEVICE, "ignoring generated connection (no IP and not in master-slave relationship)");
|
||||||
g_object_unref (connection);
|
g_object_unref (connection);
|
||||||
connection = NULL;
|
connection = NULL;
|
||||||
}
|
}
|
||||||
@@ -2150,7 +2152,7 @@ nm_device_emit_recheck_assume (gpointer self)
|
|||||||
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
|
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
|
||||||
|
|
||||||
priv->recheck_assume_id = 0;
|
priv->recheck_assume_id = 0;
|
||||||
if (!nm_device_get_act_request (self) && (priv->ip4_config || priv->ip6_config)) {
|
if (!nm_device_get_act_request (self)) {
|
||||||
_LOGD (LOGD_DEVICE, "emit RECHECK_ASSUME signal");
|
_LOGD (LOGD_DEVICE, "emit RECHECK_ASSUME signal");
|
||||||
g_signal_emit (self, signals[RECHECK_ASSUME], 0);
|
g_signal_emit (self, signals[RECHECK_ASSUME], 0);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user