diff options
author | Andrew Lassalle <andrewlassalle@chromium.org> | 2022-03-09 12:06:52 -0800 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2022-03-29 16:01:30 +0000 |
commit | 0fbab3c8dc82be0e764d72dd5236c86501deac58 (patch) | |
tree | 66afcdc873bd31e91d7cfd05dd8a02b24dcc969b | |
parent | 97933788704d7ea9fbde3004ea92c388888cb426 (diff) |
broadband-modem-mbim: Set InitialEPSBearer's authentication to CHAP when is UNKNOWN
This is the same behavior that is used when creating the bearer in
mm-bearer-mbim.
-rw-r--r-- | src/mm-broadband-modem-mbim.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/mm-broadband-modem-mbim.c b/src/mm-broadband-modem-mbim.c index ee994517..3dc547ec 100644 --- a/src/mm-broadband-modem-mbim.c +++ b/src/mm-broadband-modem-mbim.c @@ -3980,18 +3980,6 @@ before_set_lte_attach_configuration_query_ready (MbimDevice *device, } } - auth = mm_bearer_properties_get_allowed_auth (config); - if (auth == MM_BEARER_ALLOWED_AUTH_UNKNOWN) - configurations[i]->auth_protocol = MBIM_AUTH_PROTOCOL_NONE; - else { - configurations[i]->auth_protocol = mm_bearer_allowed_auth_to_mbim_auth_protocol (auth, self, &error); - if (error) { - configurations[i]->auth_protocol = MBIM_AUTH_PROTOCOL_NONE; - mm_obj_warn (self, "unexpected auth settings requested: %s", error->message); - g_clear_error (&error); - } - } - g_clear_pointer (&(configurations[i]->access_string), g_free); configurations[i]->access_string = g_strdup (mm_bearer_properties_get_apn (config)); @@ -4001,6 +3989,18 @@ before_set_lte_attach_configuration_query_ready (MbimDevice *device, g_clear_pointer (&(configurations[i]->password), g_free); configurations[i]->password = g_strdup (mm_bearer_properties_get_password (config)); + auth = mm_bearer_properties_get_allowed_auth (config); + if ((auth != MM_BEARER_ALLOWED_AUTH_UNKNOWN) || configurations[i]->user_name || configurations[i]->password) { + configurations[i]->auth_protocol = mm_bearer_allowed_auth_to_mbim_auth_protocol (auth, self, &error); + if (error) { + configurations[i]->auth_protocol = MBIM_AUTH_PROTOCOL_NONE; + mm_obj_warn (self, "unexpected auth settings requested: %s", error->message); + g_clear_error (&error); + } + } else { + configurations[i]->auth_protocol = MBIM_AUTH_PROTOCOL_NONE; + } + configurations[i]->source = MBIM_CONTEXT_SOURCE_USER; configurations[i]->compression = MBIM_COMPRESSION_NONE; break; |