diff options
Diffstat (limited to 'src/core/devices/wwan')
| -rw-r--r-- | src/core/devices/wwan/nm-device-modem.c | 15 | ||||
| -rw-r--r-- | src/core/devices/wwan/nm-modem-ofono.c | 7 |
2 files changed, 14 insertions, 8 deletions
diff --git a/src/core/devices/wwan/nm-device-modem.c b/src/core/devices/wwan/nm-device-modem.c index a1050c3f..929bda15 100644 --- a/src/core/devices/wwan/nm-device-modem.c +++ b/src/core/devices/wwan/nm-device-modem.c @@ -70,14 +70,17 @@ ppp_failed(NMModem *modem, guint i_reason, gpointer user_data) static void modem_prepare_result(NMModem *modem, gboolean success, guint i_reason, gpointer user_data) { - NMDeviceModem *self = NM_DEVICE_MODEM(user_data); - NMDeviceModemPrivate *priv = NM_DEVICE_MODEM_GET_PRIVATE(self); - NMDevice *device = NM_DEVICE(self); - NMDeviceStateReason reason = i_reason; + NMDeviceModem *self = NM_DEVICE_MODEM(user_data); + NMDeviceModemPrivate *priv = NM_DEVICE_MODEM_GET_PRIVATE(self); + NMDevice *device = NM_DEVICE(self); + NMDeviceStateReason reason = i_reason; + NMDeviceState device_state = nm_device_get_state(device); - if (nm_device_get_state(device) != NM_DEVICE_STATE_PREPARE + if (device_state != NM_DEVICE_STATE_PREPARE || priv->stage1_state != NM_DEVICE_STAGE_STATE_PENDING) { - nm_assert_not_reached(); + _LOGD(LOGD_MB, + "device no longer in prepare state when modem prepare finished ('%s')", + nm_device_state_to_string(device_state)); success = FALSE; } diff --git a/src/core/devices/wwan/nm-modem-ofono.c b/src/core/devices/wwan/nm-modem-ofono.c index de105bbd..3e0bbd48 100644 --- a/src/core/devices/wwan/nm-modem-ofono.c +++ b/src/core/devices/wwan/nm-modem-ofono.c @@ -1276,8 +1276,11 @@ handle_settings(NMModemOfono *self, GVariant *v_dict) nm_l3_config_data_add_address_4(priv->l3cd_4, &address); if (!g_variant_lookup(v_dict, "Gateway", "&s", &s) || !s) { - _LOGW("Settings 'Gateway' missing"); - goto out; + /* It is normal for point-to-point connections to not have a gateway IP + * specified. Use 0.0.0.0 in that case. + */ + _LOGD("Settings 'Gateway' missing. Setting it to 0.0.0.0"); + s = "0.0.0.0"; } if (!nm_inet_parse_bin(AF_INET, s, NULL, &gateway_network)) { _LOGW("invalid 'Gateway': %s", s); |