mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 10:10:18 +01:00
wwan/ofono: account for port in the Proxy property
This commit is contained in:
parent
264fed4778
commit
bb226d4ed1
1 changed files with 11 additions and 2 deletions
|
|
@ -1320,9 +1320,18 @@ handle_settings(NMModemOfono *self, GVariant *v_dict)
|
|||
}
|
||||
}
|
||||
|
||||
if (g_variant_lookup(v_dict, "Proxy", "&s", &s)) {
|
||||
if (g_variant_lookup(v_dict, "Proxy", "&s", &s) && s) {
|
||||
gs_free char *proxy = g_strdup(s);
|
||||
char *colon;
|
||||
|
||||
_LOGI("(MMS) Proxy: %s", s);
|
||||
if (s && nm_inet_parse_bin(AF_INET, s, NULL, &address_network)) {
|
||||
|
||||
/* 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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue