Commit 3302fba2 authored by Dan Williams's avatar Dan Williams
Browse files

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.
parent a1e89b4d
...@@ -1041,6 +1041,13 @@ carrier_changed (NMDevice *device, gboolean carrier) ...@@ -1041,6 +1041,13 @@ carrier_changed (NMDevice *device, gboolean carrier)
if (priv->state == NM_DEVICE_STATE_UNAVAILABLE) { if (priv->state == NM_DEVICE_STATE_UNAVAILABLE) {
nm_device_queue_state (device, NM_DEVICE_STATE_DISCONNECTED, nm_device_queue_state (device, NM_DEVICE_STATE_DISCONNECTED,
NM_DEVICE_STATE_REASON_CARRIER); 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 { } else {
g_return_if_fail (priv->state >= NM_DEVICE_STATE_UNAVAILABLE); g_return_if_fail (priv->state >= NM_DEVICE_STATE_UNAVAILABLE);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment