diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2017-10-26 19:56:52 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2017-10-26 20:23:15 +0200 |
commit | eecba7492655b8f5b4ae539e961d072b25e1c552 (patch) | |
tree | 205f879615bb901398215ad0cc6ce64016e625b8 | |
parent | 991a0b9404c284681c46232057d8e742468cb812 (diff) | |
download | NetworkManager-eecba7492655b8f5b4ae539e961d072b25e1c552.tar.gz |
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.
-rw-r--r-- | src/devices/nm-device.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 948ecb4646..96ccb81754 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -6258,9 +6258,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 |