about summary refs log tree commit diff
path: root/src/core/devices/wwan
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2023-06-12 11:26:40 +0200
committerMichael Biebl <biebl@debian.org>2023-06-12 11:26:40 +0200
commit0201cd4d5f16d814abbd0c04dc53a39fc1e9bf8c (patch)
tree1d7c2916d4e4ac9396e6c561efd1ccb0998a1949 /src/core/devices/wwan
parent12e1ee797bbf0b10d1fd5afd4b947484769f2b9f (diff)
parent150fe9eef8dd22307ee16687509acde616663982 (diff)
Update upstream source from tag 'upstream/1.42.6'
Update to upstream version '1.42.6'
with Debian dir 8be9ac7ed401d9957f945770395562546a320da3
Diffstat (limited to 'src/core/devices/wwan')
-rw-r--r--src/core/devices/wwan/nm-modem-ofono.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/core/devices/wwan/nm-modem-ofono.c b/src/core/devices/wwan/nm-modem-ofono.c
index 33a19e93..de105bbd 100644
--- a/src/core/devices/wwan/nm-modem-ofono.c
+++ b/src/core/devices/wwan/nm-modem-ofono.c
@@ -1320,9 +1320,18 @@ handle_settings(NMModemOfono *self, GVariant *v_dict)
         }
     }
 
-    if (g_variant_lookup(v_dict, "MessageProxy", "&s", &s)) {
-        _LOGI("MessageProxy: %s", s);
-        if (s && nm_inet_parse_bin(AF_INET, s, NULL, &address_network)) {
+    if (g_variant_lookup(v_dict, "Proxy", "&s", &s) && s) {
+        gs_free char *proxy = g_strdup(s);
+        char         *colon;
+
+        _LOGI("(MMS) Proxy: %s", s);
+
+        /* Strip the port out. We can do this as we know this is IPv4. */
+        colon = strchr(proxy, ':');
+        if (colon)
+            *colon = '\0';
+
+        if (nm_inet_parse_bin(AF_INET, proxy, NULL, &address_network)) {
             const NMPlatformIP4Route mms_route = {
                 .network       = address_network,
                 .plen          = 32,
@@ -1335,7 +1344,7 @@ handle_settings(NMModemOfono *self, GVariant *v_dict)
 
             nm_l3_config_data_add_route_4(priv->l3cd_4, &mms_route);
         } else
-            _LOGW("invalid MessageProxy: %s", s);
+            _LOGW("invalid (MMS) Proxy: %s", s);
     }
 
     ret = TRUE;