From 150fe9eef8dd22307ee16687509acde616663982 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Mon, 12 Jun 2023 11:25:29 +0200 Subject: New upstream version 1.42.6 --- src/core/devices/wwan/nm-modem-ofono.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/core/devices/wwan') 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; -- cgit 1.3.0-6-gf8a5