diff options
| author | Michael Biebl <biebl@debian.org> | 2023-10-04 11:44:49 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2023-10-04 11:44:49 +0200 |
| commit | d4d8b2b91f7ba000d97a8b2aab48c85000c11314 (patch) | |
| tree | 4bae747b430c9dae89c22cbf298cbf6c862a52b8 /src/core/devices | |
| parent | 05e4a733f2141995181a551854d5df929f084adf (diff) | |
New upstream version 1.44.2 upstream/1.44.2
Diffstat (limited to 'src/core/devices')
| -rw-r--r-- | src/core/devices/nm-device.c | 16 | ||||
| -rw-r--r-- | src/core/devices/wwan/nm-device-modem.c | 15 | ||||
| -rw-r--r-- | src/core/devices/wwan/nm-modem-ofono.c | 7 |
3 files changed, 29 insertions, 9 deletions
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index 2038e2f2..d1212560 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -4247,6 +4247,20 @@ _dev_l3_cfg_notify_cb(NML3Cfg *l3cfg, const NML3ConfigNotifyData *notify_data, N case NM_L3_CONFIG_NOTIFY_TYPE_ACD_EVENT: { const NML3AcdAddrInfo *addr_info = ¬ify_data->acd_event.info; + char buf_addr[NM_INET_ADDRSTRLEN]; + + if (addr_info->state == NM_L3_ACD_ADDR_STATE_USED) { + _LOGI(LOGD_DEVICE, + "IP address %s cannot be configured because it is already in use in the " + "network by host %s", + nm_inet4_ntop(addr_info->addr, buf_addr), + nm_ether_addr_to_string_a(&addr_info->last_conflict_addr)); + } else if (addr_info->state == NM_L3_ACD_ADDR_STATE_CONFLICT) { + _LOGI(LOGD_DEVICE, + "conflict detected for IP address %s with host %s", + nm_inet4_ntop(addr_info->addr, buf_addr), + nm_ether_addr_to_string_a(&addr_info->last_conflict_addr)); + } if (addr_info->state > NM_L3_ACD_ADDR_STATE_PROBING) _dev_ipmanual_check_ready(self); @@ -8740,7 +8754,7 @@ _get_maybe_ipv6_disabled(NMDevice *self) return FALSE; path = nm_sprintf_bufa(128, "/proc/sys/net/ipv6/conf/%s/disable_ipv6", ifname); - return (nm_platform_sysctl_get_int32(platform, NMP_SYSCTL_PATHID_ABSOLUTE(path), 0) == 0); + return (nm_platform_sysctl_get_int32(platform, NMP_SYSCTL_PATHID_ABSOLUTE(path), 1) != 0); } /* 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); |