summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2023-10-02 13:27:36 +0000
committerBeniamino Galvani <bgalvani@redhat.com>2023-10-02 13:27:36 +0000
commit9820e791d1ddf64b5b495cda7c12c81fd77ff5dd (patch)
tree9f38e375c245e23c418aa62b7e709c7ad2cb926c
parent1486c78b13d2aee87e2ae6b26dde54a08e25ab1d (diff)
parent96ae8b794f4b7c54185a3a4409d2ee4a888021c4 (diff)
merge: branch 'ungateway-ofono'
wwan/ofono: handle missing default gateway https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1731
-rw-r--r--src/core/devices/wwan/nm-modem-ofono.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/devices/wwan/nm-modem-ofono.c b/src/core/devices/wwan/nm-modem-ofono.c
index de105bbdd3..3e0bbd486e 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);