diff options
author | Dan Williams <dcbw@redhat.com> | 2014-03-14 15:21:14 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2014-03-17 10:34:53 -0500 |
commit | 3302fba21cbc35c769b6ca760501ee2b7ad90942 (patch) | |
tree | cc8d397efa6562769e3349fcc037f9513f658b38 | |
parent | a1e89b4d29b97695f21e0070888f7910f7fe7a87 (diff) | |
download | NetworkManager-3302fba21cbc35c769b6ca760501ee2b7ad90942.tar.gz |
core: fix auto-activation of ignore-carrier devices when carrier appears (rh #1076592)
If a device had its carrier ignored, and did not have a carrier on startup,
then NetworkManager would not re-check autoconnect connections when the
device's carrier appeared. Because ignore-carrier devices are always
in DISCONNECTED state when they are managed, the nm-device.c::carrier_changed()
code essentially did nothing when the carrier appeared. It needs to
also trigger an auto-activation recheck signal when the carrier appears
to ensure that now-valid connections (like those that require DHCP or
IPv6) can be auto-activated.
-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 d5c4386c5e..110a1f39ee 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -1041,6 +1041,13 @@ carrier_changed (NMDevice *device, gboolean carrier) if (priv->state == NM_DEVICE_STATE_UNAVAILABLE) { nm_device_queue_state (device, NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_CARRIER); + } else if (priv->state == NM_DEVICE_STATE_DISCONNECTED) { + /* If the device is already in DISCONNECTED state without a carrier + * (probably because it is tagged for carrier ignore) ensure that + * when the carrier appears, auto connections are rechecked for + * the device. + */ + nm_device_emit_recheck_auto_activate (device); } } else { g_return_if_fail (priv->state >= NM_DEVICE_STATE_UNAVAILABLE); |