diff options
author | Madhav <madhavadas@google.com> | 2024-01-19 01:01:06 +0000 |
---|---|---|
committer | Madhav <madhavadas@google.com> | 2024-01-25 21:52:31 +0000 |
commit | 1655d0e014eb7019cbc51d90006d730d73a275fd (patch) | |
tree | fd378c15631722430fba104cc5c04a610e803a19 /src/mm-modem-helpers.c | |
parent | e8f1edc5c4976163a569f74cf49446bc67f88424 (diff) |
bearer-mbim: When an IP type is unspecified in the profile, default to IPv4v6 (dual-stack)
To address limitations in reading IP_TYPE information (in some cases) for profile requests,
default to IPv4v6 (dual-stack) for profile requests and IPv4 only for user requests (to ensure backward compatibility)
if nothing specific is requested. This ensures network compatibility across IPv4 and IPv6 networks,
preventing potential connectivity issues in IPv6 environments.
Diffstat (limited to 'src/mm-modem-helpers.c')
-rw-r--r-- | src/mm-modem-helpers.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mm-modem-helpers.c b/src/mm-modem-helpers.c index 157cb19c..44e8e71e 100644 --- a/src/mm-modem-helpers.c +++ b/src/mm-modem-helpers.c @@ -4119,11 +4119,16 @@ mm_3gpp_get_ip_family_from_pdp_type (const gchar *pdp_type) } gboolean -mm_3gpp_normalize_ip_family (MMBearerIpFamily *family) -{ - /* if nothing specific requested, default to IPv4 */ +mm_3gpp_normalize_ip_family (MMBearerIpFamily *family, gboolean from_user) +{ + /* To address limitations in reading IP_TYPE information (in some cases) for + * profile requests, default to IPv4v6 (dual-stack) for profile requests and + * IPv4 only for user requests (to ensure backward compatibility) if nothing + * specific is requested. This ensures network compatibility across IPv4 and IPv6 networks, + * preventing potential connectivity issues in IPv6 environments. + */ if (*family == MM_BEARER_IP_FAMILY_NONE || *family == MM_BEARER_IP_FAMILY_ANY) { - *family = MM_BEARER_IP_FAMILY_IPV4; + *family = from_user ? MM_BEARER_IP_FAMILY_IPV4 : MM_BEARER_IP_FAMILY_IPV4V6; return TRUE; } |