diff --git a/src/nm-policy.c b/src/nm-policy.c index aed2f89..ed41f2e 100644 --- a/src/nm-policy.c +++ b/src/nm-policy.c @@ -854,13 +854,15 @@ device_state_changed (NMDevice *device, { NMPolicy *policy = (NMPolicy *) user_data; NMConnection *connection = get_device_connection (device); + NMDeviceType device_type = nm_device_get_device_type (device); + int is_modem = (device_type == NM_DEVICE_TYPE_GSM) || (device_type == NM_DEVICE_TYPE_CDMA); switch (new_state) { case NM_DEVICE_STATE_FAILED: /* Mark the connection invalid if it failed during activation so that * it doesn't get automatically chosen over and over and over again. */ - if (connection && IS_ACTIVATING_STATE (old_state)) { + if (connection && IS_ACTIVATING_STATE (old_state) && !is_modem) { g_object_set_data (G_OBJECT (connection), INVALID_TAG, GUINT_TO_POINTER (TRUE)); nm_log_info (LOGD_DEVICE, "Marking connection '%s' invalid.", get_connection_id (connection)); nm_connection_clear_secrets (connection);