diff options
author | Dan Williams <dcbw@redhat.com> | 2015-03-27 17:39:20 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2015-04-02 15:10:43 -0500 |
commit | 568a8d1da924357125a6addd81b5f870bf31e144 (patch) | |
tree | 4bdcef5ab5c4b010071f74659b40b7accfa7aa1f /src | |
parent | 4c9cdce63028c76e95548d761c81b4aeeb4a33e2 (diff) | |
download | NetworkManager-568a8d1da924357125a6addd81b5f870bf31e144.tar.gz |
bridge/bond/team: device availability shouldn't depend on IFF_UP (bgo #746918)
The merge of lr/udev-unmanaged-fd731014 made all devices wait until
udev found them, but that makes these three device types fail activate
when created by NM itself.
Since their availability depended on IFF_UP, they could not be
activated (eg, 'nmcli con up team0') until they were IFF_UP. But
when they are created by NM, although NM knows the ifindex the
platform ignores the interface until udev finds it. Thus immediately
after creating the interface in _internal_activate_device() it
won't be known to the platform, so the nm_device_is_available()
check that controls whether the device moves to DISCONNECTED
will fail. This prevents any activation and emits the message:
"Connection 'foo' is not available on the device %s at this time."
because the device is still in the UNAVAILABLE state.
danw asked why we care about IFF_UP for these devices, and I can't
remember why, and I don't think it makes sense to require now.
https://bugzilla.gnome.org/show_bug.cgi?id=746918
Diffstat (limited to 'src')
-rw-r--r-- | src/devices/nm-device-bond.c | 4 | ||||
-rw-r--r-- | src/devices/nm-device-bridge.c | 4 | ||||
-rw-r--r-- | src/devices/team/nm-device-team.c | 4 |
3 files changed, 3 insertions, 9 deletions
diff --git a/src/devices/nm-device-bond.c b/src/devices/nm-device-bond.c index 6b4581082b..3424c2a96c 100644 --- a/src/devices/nm-device-bond.c +++ b/src/devices/nm-device-bond.c @@ -70,9 +70,7 @@ get_generic_capabilities (NMDevice *dev) static gboolean is_available (NMDevice *dev, NMDeviceCheckDevAvailableFlags flags) { - if (NM_DEVICE_GET_CLASS (dev)->is_up) - return NM_DEVICE_GET_CLASS (dev)->is_up (dev); - return FALSE; + return TRUE; } static gboolean diff --git a/src/devices/nm-device-bridge.c b/src/devices/nm-device-bridge.c index c92e8ddfa7..949196f3f6 100644 --- a/src/devices/nm-device-bridge.c +++ b/src/devices/nm-device-bridge.c @@ -68,9 +68,7 @@ get_generic_capabilities (NMDevice *dev) static gboolean is_available (NMDevice *dev, NMDeviceCheckDevAvailableFlags flags) { - if (NM_DEVICE_GET_CLASS (dev)->is_up) - return NM_DEVICE_GET_CLASS (dev)->is_up (dev); - return FALSE; + return TRUE; } static gboolean diff --git a/src/devices/team/nm-device-team.c b/src/devices/team/nm-device-team.c index de0c2ee7ed..562b2804c5 100644 --- a/src/devices/team/nm-device-team.c +++ b/src/devices/team/nm-device-team.c @@ -79,9 +79,7 @@ get_generic_capabilities (NMDevice *device) static gboolean is_available (NMDevice *device, NMDeviceCheckDevAvailableFlags flags) { - if (NM_DEVICE_GET_CLASS (device)->is_up) - return NM_DEVICE_GET_CLASS (device)->is_up (device); - return FALSE; + return TRUE; } static gboolean |