aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2013-06-04 12:48:04 +0200
committerAleksander Morgado <aleksander@lanedo.com>2013-06-05 19:15:15 +0200
commite446db9ca4c31bb18a36ff759d8f7f51c3719178 (patch)
treed095bf7b0257c2d9df2e71e03e3216fd67e81fda
parent5b080915200d0ba5de28d50bb088eba0aef9b362 (diff)
huawei: default to IPv4 if no specific IP type to use given in NDISDUP modems
-rw-r--r--plugins/huawei/mm-broadband-bearer-huawei.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/plugins/huawei/mm-broadband-bearer-huawei.c b/plugins/huawei/mm-broadband-bearer-huawei.c
index a5f88b06..6d1414d3 100644
--- a/plugins/huawei/mm-broadband-bearer-huawei.c
+++ b/plugins/huawei/mm-broadband-bearer-huawei.c
@@ -225,10 +225,21 @@ connect_3gpp_context_step (Connect3gppContext *ctx)
switch (ctx->step) {
case CONNECT_3GPP_CONTEXT_STEP_FIRST: {
- MMBearerIpFamily ip_type;
+ MMBearerIpFamily ip_family;
+
+ ip_family = mm_bearer_properties_get_ip_type (mm_bearer_peek_config (MM_BEARER (ctx->self)));
+ if (ip_family == MM_BEARER_IP_FAMILY_NONE ||
+ ip_family == MM_BEARER_IP_FAMILY_ANY) {
+ gchar *ip_family_str;
+
+ ip_family = mm_bearer_get_default_ip_family (MM_BEARER (ctx->self));
+ ip_family_str = mm_bearer_ip_family_build_string_from_mask (ip_family);
+ mm_dbg ("No specific IP family requested, defaulting to %s",
+ ip_family_str);
+ g_free (ip_family_str);
+ }
- ip_type = mm_bearer_properties_get_ip_type (mm_bearer_peek_config (MM_BEARER (ctx->self)));
- if (ip_type != MM_BEARER_IP_FAMILY_IPV4) {
+ if (ip_family != MM_BEARER_IP_FAMILY_IPV4) {
g_simple_async_result_set_error (ctx->result,
MM_CORE_ERROR,
MM_CORE_ERROR_UNSUPPORTED,