From dcfe276a829a5b965458aa73169cbc39ebc674c4 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Thu, 26 Oct 2017 19:56:52 +0200 Subject: [PATCH] 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. --- src/devices/nm-device.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 8e50eaaed8..5e8053b882 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -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