device: don't wait for a carrier before enslaving devices

The OpenVSwitch interfaces come into existence by their enslavement to a port.
They can also bear an IP4 or IP6 configuration -- waiting on a carrier would
deadlock the acitvation.
This commit is contained in:
Lubomir Rintel 2017-10-26 19:56:52 +02:00
parent 340e35c09d
commit dcfe276a82

View file

@ -6255,9 +6255,16 @@ static gboolean
connection_requires_carrier (NMConnection *connection)
{
NMSettingIPConfig *s_ip4, *s_ip6;
NMSettingConnection *s_con;
gboolean ip4_carrier_wanted, ip6_carrier_wanted;
gboolean ip4_used = FALSE, ip6_used = FALSE;
/* We can progress to IP_CONFIG now, so that we're enslaved.
* That may actually cause carrier to go up and thus continue acivation. */
s_con = nm_connection_get_setting_connection (connection);
if (nm_setting_connection_get_master (s_con))
return FALSE;
ip4_carrier_wanted = connection_ip4_method_requires_carrier (connection, &ip4_used);
if (ip4_carrier_wanted) {
/* If IPv4 wants a carrier and cannot fail, the whole connection