[PATCH] core: fix bug with ignore-carrier and master/slave devices (rh #1083521)



Even ignore-carrier devices need to be aware of carrier-up events so
they can continue DHCP when the link comes up.  They just ignore all
carrier-down events.
---
 src/devices/nm-device.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 7e2f034..0906da3 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -1004,19 +1004,17 @@ carrier_changed (NMDevice *device, gboolean carrier)
        NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (device);
 
        if (!nm_device_get_managed (device))
                return;
 
        nm_device_recheck_available_connections (device);
 
-       if (priv->ignore_carrier) {
-               /* Ignore all carrier-off, and ignore carrier-on on connected devices */
-               if (!carrier || priv->state > NM_DEVICE_STATE_DISCONNECTED)
-                       return;
-       }
+       /* ignore-carrier devices ignore all carrier-down events */
+       if (priv->ignore_carrier && !carrier)
+               return;
 
        if (nm_device_is_master (device)) {
                /* Bridge/bond/team carrier does not affect its own activation,
                 * but when carrier comes on, if there are slaves waiting,
                 * it will restart them.
                 */
                if (!carrier)
-- 
1.9.0




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]