From a47d44cffd22aab88d900183e0ddd930107da86f Mon Sep 17 00:00:00 2001 From: Josef Ouano Date: Fri, 5 Apr 2024 07:02:50 +0000 Subject: [PATCH 1/2] wwan: added additional initial eps bearer settings Added the following settings for initial EPS bearer: - Username - Password - Allowed Auth - APN Type Setting --- src/core/devices/wwan/nm-modem-broadband.c | 25 +- src/libnm-client-impl/libnm.ver | 8 + ...gen-metadata-nm-settings-libnm-core.xml.in | 38 +++ src/libnm-core-impl/nm-setting-gsm.c | 304 +++++++++++++++++- src/libnm-core-public/nm-setting-gsm.h | 55 +++- src/libnmc-setting/nm-meta-setting-desc.c | 28 ++ src/libnmc-setting/settings-docs.h.in | 9 + .../gen-metadata-nm-settings-nmcli.xml.in | 34 ++ .../test_003.expected | 114 +++++-- 9 files changed, 567 insertions(+), 48 deletions(-) diff --git a/src/core/devices/wwan/nm-modem-broadband.c b/src/core/devices/wwan/nm-modem-broadband.c index 0231829ed..298628038 100644 --- a/src/core/devices/wwan/nm-modem-broadband.c +++ b/src/core/devices/wwan/nm-modem-broadband.c @@ -668,6 +668,8 @@ connect_context_step(NMModemBroadband *self) NMSettingGsm *s_gsm = nm_connection_get_setting_gsm(ctx->connection); const char *apn = nm_setting_gsm_get_initial_eps_apn(s_gsm); gboolean do_config = nm_setting_gsm_get_initial_eps_config(s_gsm); + const char *username = nm_setting_gsm_get_initial_eps_username(s_gsm); + const char *password = nm_setting_gsm_get_initial_eps_password(s_gsm); /* assume do_config is true if an APN is set */ if (apn || do_config) { @@ -690,9 +692,28 @@ connect_context_step(NMModemBroadband *self) /* do nothing */ break; } - if (apn) - mm_bearer_properties_set_apn(config, apn); + if (apn) { + MMBearerAllowedAuth allowed_auth = MM_BEARER_ALLOWED_AUTH_UNKNOWN; + mm_bearer_properties_set_apn(config, apn); + mm_bearer_properties_set_user(config, username); + mm_bearer_properties_set_password(config, password); + + if (nm_setting_gsm_get_initial_eps_noauth(s_gsm)) + allowed_auth |= MM_BEARER_ALLOWED_AUTH_NONE; + if (!nm_setting_gsm_get_initial_eps_refuse_pap(s_gsm)) + allowed_auth |= MM_BEARER_ALLOWED_AUTH_PAP; + if (!nm_setting_gsm_get_initial_eps_refuse_chap(s_gsm)) + allowed_auth |= MM_BEARER_ALLOWED_AUTH_CHAP; + if (!nm_setting_gsm_get_initial_eps_refuse_mschap(s_gsm)) + allowed_auth |= MM_BEARER_ALLOWED_AUTH_MSCHAP; + if (!nm_setting_gsm_get_initial_eps_refuse_mschapv2(s_gsm)) + allowed_auth |= MM_BEARER_ALLOWED_AUTH_MSCHAPV2; + if (!nm_setting_gsm_get_initial_eps_refuse_eap(s_gsm)) + allowed_auth |= MM_BEARER_ALLOWED_AUTH_EAP; + + mm_bearer_properties_set_allowed_auth(config, allowed_auth); + } /* * Setting the initial EPS bearer settings is a no-op in * ModemManager if the desired configuration is already active. diff --git a/src/libnm-client-impl/libnm.ver b/src/libnm-client-impl/libnm.ver index eb3645b2c..13eb89ac2 100644 --- a/src/libnm-client-impl/libnm.ver +++ b/src/libnm-client-impl/libnm.ver @@ -2023,4 +2023,12 @@ global: nm_setting_ipvlan_get_vepa; nm_setting_ipvlan_mode_get_type; nm_setting_ipvlan_new; + nm_setting_gsm_get_initial_eps_password; + nm_setting_gsm_get_initial_eps_username; + nm_setting_gsm_get_initial_eps_noauth; + nm_setting_gsm_get_initial_eps_refuse_pap; + nm_setting_gsm_get_initial_eps_refuse_chap; + nm_setting_gsm_get_initial_eps_refuse_eap; + nm_setting_gsm_get_initial_eps_refuse_mschap; + nm_setting_gsm_get_initial_eps_refuse_mschapv2; } libnm_1_50_0; diff --git a/src/libnm-core-impl/gen-metadata-nm-settings-libnm-core.xml.in b/src/libnm-core-impl/gen-metadata-nm-settings-libnm-core.xml.in index 0b03d3628..202344e9b 100644 --- a/src/libnm-core-impl/gen-metadata-nm-settings-libnm-core.xml.in +++ b/src/libnm-core-impl/gen-metadata-nm-settings-libnm-core.xml.in @@ -1389,6 +1389,44 @@ dbus-type="b" gprop-type="gboolean" /> + + + + + + + + + initial_eps_apn; } +/** + * nm_setting_gsm_get_initial_eps_username: + * @setting: the #NMSettingGsm + * + * Returns: the #NMSettingGsm:initial-eps-bearer-username property of the setting + * + * Since: 1.52 + **/ +const char * +nm_setting_gsm_get_initial_eps_username(NMSettingGsm *setting) +{ + g_return_val_if_fail(NM_IS_SETTING_GSM(setting), NULL); + + return NM_SETTING_GSM_GET_PRIVATE(setting)->initial_eps_username; +} + +/** + * nm_setting_gsm_get_initial_eps_password: + * @setting: the #NMSettingGsm + * + * Returns: the #NMSettingGsm:initial-eps-bearer-password property of the setting + * + * Since: 1.52 + **/ +const char * +nm_setting_gsm_get_initial_eps_password(NMSettingGsm *setting) +{ + g_return_val_if_fail(NM_IS_SETTING_GSM(setting), NULL); + + return NM_SETTING_GSM_GET_PRIVATE(setting)->initial_eps_password; +} + +/** + * nm_setting_gsm_get_initial_eps_noauth: + * @setting: the #NMSettingGsm + * + * Returns: For LTE modems, the #NMSettingGsm:initial-eps-noauth property of the setting + * + * Since: 1.52 + **/ +gboolean +nm_setting_gsm_get_initial_eps_noauth(NMSettingGsm *setting) +{ + g_return_val_if_fail(NM_IS_SETTING_GSM(setting), FALSE); + + return NM_SETTING_GSM_GET_PRIVATE(setting)->initial_eps_noauth; +} + +/** + * nm_setting_gsm_get_initial_eps_refuse_eap: + * @setting: the #NMSettingGsm + * + * Returns: For LTE modems, the #NMSettingGsm:initial-eps-refuse-eap property of the setting + * + * Since: 1.52 + **/ +gboolean +nm_setting_gsm_get_initial_eps_refuse_eap(NMSettingGsm *setting) +{ + g_return_val_if_fail(NM_IS_SETTING_GSM(setting), FALSE); + + return NM_SETTING_GSM_GET_PRIVATE(setting)->initial_eps_refuse_eap; +} + +/** + * nm_setting_gsm_get_initial_eps_refuse_pap: + * @setting: the #NMSettingGsm + * + * Returns: For LTE modems, the #NMSettingGsm:initial-eps-refuse-pap property of the setting + * + * Since: 1.52 + **/ +gboolean +nm_setting_gsm_get_initial_eps_refuse_pap(NMSettingGsm *setting) +{ + g_return_val_if_fail(NM_IS_SETTING_GSM(setting), FALSE); + + return NM_SETTING_GSM_GET_PRIVATE(setting)->initial_eps_refuse_pap; +} + +/** + * nm_setting_gsm_get_initial_eps_refuse_chap: + * @setting: the #NMSettingGsm + * + * Returns: For LTE modems, the #NMSettingGsm:initial-eps-refuse-chap property of the setting + * + * Since: 1.52 + **/ +gboolean +nm_setting_gsm_get_initial_eps_refuse_chap(NMSettingGsm *setting) +{ + g_return_val_if_fail(NM_IS_SETTING_GSM(setting), FALSE); + + return NM_SETTING_GSM_GET_PRIVATE(setting)->initial_eps_refuse_chap; +} + +/** + * nm_setting_gsm_get_initial_eps_refuse_mschap: + * @setting: the #NMSettingGsm + * + * Returns: For LTE modems, the #NMSettingGsm:initial-eps-refuse-mschap property of the setting + * + * Since: 1.52 + **/ +gboolean +nm_setting_gsm_get_initial_eps_refuse_mschap(NMSettingGsm *setting) +{ + g_return_val_if_fail(NM_IS_SETTING_GSM(setting), FALSE); + + return NM_SETTING_GSM_GET_PRIVATE(setting)->initial_eps_refuse_mschap; +} + +/** + * nm_setting_gsm_get_initial_eps_refuse_mschapv2: + * @setting: the #NMSettingGsm + * + * Returns: For LTE modems, the #NMSettingGsm:initial-eps-refuse-mschapv2 property of the setting + * + * Since: 1.52 + **/ +gboolean +nm_setting_gsm_get_initial_eps_refuse_mschapv2(NMSettingGsm *setting) +{ + g_return_val_if_fail(NM_IS_SETTING_GSM(setting), FALSE); + + return NM_SETTING_GSM_GET_PRIVATE(setting)->initial_eps_refuse_mschapv2; +} + static gboolean _verify_apn(const char *apn, gboolean allow_empty, const char *property_name, GError **error) { @@ -847,6 +993,162 @@ nm_setting_gsm_class_init(NMSettingGsmClass *klass) initial_eps_apn, .direct_string_allow_empty = TRUE); + /** + * NMSettingGsm:initial-eps-bearer-username: + * + * For LTE modems, this sets the username for the initial EPS bearer that is set + * up when attaching to the network. Setting this parameter implies + * initial-eps-bearer-configure to be TRUE. + * + * Since: 1.52 + **/ + _nm_setting_property_define_direct_string(properties_override, + obj_properties, + NM_SETTING_GSM_INITIAL_EPS_BEARER_USERNAME, + PROP_INITIAL_EPS_USERNAME, + NM_SETTING_PARAM_NONE, + NMSettingGsmPrivate, + initial_eps_username, + .direct_string_allow_empty = TRUE); + + /** + * NMSettingGsm:initial-eps-bearer-password: + * + * For LTE modems, this sets the password for the initial EPS bearer that is set + * up when attaching to the network. Setting this parameter implies + * initial-eps-bearer-configure to be TRUE. + * + * Since: 1.52 + **/ + _nm_setting_property_define_direct_string(properties_override, + obj_properties, + NM_SETTING_GSM_INITIAL_EPS_BEARER_PASSWORD, + PROP_INITIAL_EPS_PASSWORD, + NM_SETTING_PARAM_SECRET, + NMSettingGsmPrivate, + initial_eps_password, + .direct_string_allow_empty = TRUE); + + /** + * NMSettingGsm:initial-eps-bearer-password-flags: + * + * Flags indicating how to handle the #NMSettingGsm:initial-eps-bearer-password property. + * + * Since: 1.52 + **/ + _nm_setting_property_define_direct_secret_flags( + properties_override, + obj_properties, + NM_SETTING_GSM_INITIAL_EPS_BEARER_PASSWORD_FLAGS, + PROP_INITIAL_EPS_PASSWORD_FLAGS, + NMSettingGsmPrivate, + initial_eps_password_flags); + + /** + * NMSettingGsm:initial-eps-bearer-noauth: + * + * For LTE modems, this sets NOAUTH authentication method for the initial EPS bearer that is set + * up when attaching to the network. + * If %TRUE, do not require the other side to authenticate itself to the client. + * If %FALSE, require authentication from the remote side. In almost all cases, + * this should be %TRUE. + * + * Since: 1.52 + **/ + _nm_setting_property_define_direct_boolean(properties_override, + obj_properties, + NM_SETTING_GSM_INITIAL_EPS_BEARER_NOAUTH, + PROP_INITIAL_EPS_NOAUTH, + TRUE, + NM_SETTING_PARAM_NONE, + NMSettingGsmPrivate, + initial_eps_noauth); + + /** + * NMSettingGsm:initial-eps-bearer-refuse-eap: + * + * For LTE modems, this disables EAP authentication method for the initial EPS bearer that is set + * up when attaching to the network. + * + * Since: 1.52 + **/ + _nm_setting_property_define_direct_boolean(properties_override, + obj_properties, + NM_SETTING_GSM_INITIAL_EPS_BEARER_REFUSE_EAP, + PROP_INITIAL_EPS_REFUSE_EAP, + FALSE, + NM_SETTING_PARAM_NONE, + NMSettingGsmPrivate, + initial_eps_refuse_eap); + + /** + * NMSettingGsm:initial-eps-bearer-refuse-pap: + * + * For LTE modems, this disables PAP authentication method for the initial EPS bearer that is set + * up when attaching to the network. + * + * Since: 1.52 + **/ + _nm_setting_property_define_direct_boolean(properties_override, + obj_properties, + NM_SETTING_GSM_INITIAL_EPS_BEARER_REFUSE_PAP, + PROP_INITIAL_EPS_REFUSE_PAP, + FALSE, + NM_SETTING_PARAM_NONE, + NMSettingGsmPrivate, + initial_eps_refuse_pap); + + /** + * NMSettingGsm:initial-eps-bearer-refuse-chap: + * + * For LTE modems, this disables CHAP authentication method for the initial EPS bearer that is set + * up when attaching to the network. + * + * Since: 1.52 + **/ + _nm_setting_property_define_direct_boolean(properties_override, + obj_properties, + NM_SETTING_GSM_INITIAL_EPS_BEARER_REFUSE_CHAP, + PROP_INITIAL_EPS_REFUSE_CHAP, + FALSE, + NM_SETTING_PARAM_NONE, + NMSettingGsmPrivate, + initial_eps_refuse_chap); + + /** + * NMSettingGsm:initial-eps-bearer-refuse-mschap: + * + * For LTE modems, this disables MSCHAP authentication method for the initial EPS bearer that is set + * up when attaching to the network. + * + * Since: 1.52 + **/ + _nm_setting_property_define_direct_boolean(properties_override, + obj_properties, + NM_SETTING_GSM_INITIAL_EPS_BEARER_REFUSE_MSCHAP, + PROP_INITIAL_EPS_REFUSE_MSCHAP, + FALSE, + NM_SETTING_PARAM_NONE, + NMSettingGsmPrivate, + initial_eps_refuse_mschap); + + /** + * NMSettingGsm:initial-eps-bearer-refuse-mschapv2: + * + * For LTE modems, this disables MSCHAPV2 authentication method for the initial EPS bearer that is set + * up when attaching to the network. + * + * Since: 1.52 + **/ + _nm_setting_property_define_direct_boolean(properties_override, + obj_properties, + NM_SETTING_GSM_INITIAL_EPS_BEARER_REFUSE_MSCHAPV2, + PROP_INITIAL_EPS_REFUSE_MSCHAPV2, + FALSE, + NM_SETTING_PARAM_NONE, + NMSettingGsmPrivate, + initial_eps_refuse_mschapv2); + /* Ignore incoming deprecated properties */ _nm_properties_override_dbus(properties_override, "allowed-bands", diff --git a/src/libnm-core-public/nm-setting-gsm.h b/src/libnm-core-public/nm-setting-gsm.h index dd5b0b26d..c86635027 100644 --- a/src/libnm-core-public/nm-setting-gsm.h +++ b/src/libnm-core-public/nm-setting-gsm.h @@ -26,21 +26,30 @@ G_BEGIN_DECLS #define NM_SETTING_GSM_SETTING_NAME "gsm" -#define NM_SETTING_GSM_AUTO_CONFIG "auto-config" -#define NM_SETTING_GSM_USERNAME "username" -#define NM_SETTING_GSM_PASSWORD "password" -#define NM_SETTING_GSM_PASSWORD_FLAGS "password-flags" -#define NM_SETTING_GSM_APN "apn" -#define NM_SETTING_GSM_NETWORK_ID "network-id" -#define NM_SETTING_GSM_PIN "pin" -#define NM_SETTING_GSM_PIN_FLAGS "pin-flags" -#define NM_SETTING_GSM_HOME_ONLY "home-only" -#define NM_SETTING_GSM_DEVICE_ID "device-id" -#define NM_SETTING_GSM_SIM_ID "sim-id" -#define NM_SETTING_GSM_SIM_OPERATOR_ID "sim-operator-id" -#define NM_SETTING_GSM_MTU "mtu" -#define NM_SETTING_GSM_INITIAL_EPS_BEARER_CONFIGURE "initial-eps-bearer-configure" -#define NM_SETTING_GSM_INITIAL_EPS_BEARER_APN "initial-eps-bearer-apn" +#define NM_SETTING_GSM_AUTO_CONFIG "auto-config" +#define NM_SETTING_GSM_USERNAME "username" +#define NM_SETTING_GSM_PASSWORD "password" +#define NM_SETTING_GSM_PASSWORD_FLAGS "password-flags" +#define NM_SETTING_GSM_APN "apn" +#define NM_SETTING_GSM_NETWORK_ID "network-id" +#define NM_SETTING_GSM_PIN "pin" +#define NM_SETTING_GSM_PIN_FLAGS "pin-flags" +#define NM_SETTING_GSM_HOME_ONLY "home-only" +#define NM_SETTING_GSM_DEVICE_ID "device-id" +#define NM_SETTING_GSM_SIM_ID "sim-id" +#define NM_SETTING_GSM_SIM_OPERATOR_ID "sim-operator-id" +#define NM_SETTING_GSM_MTU "mtu" +#define NM_SETTING_GSM_INITIAL_EPS_BEARER_CONFIGURE "initial-eps-bearer-configure" +#define NM_SETTING_GSM_INITIAL_EPS_BEARER_APN "initial-eps-bearer-apn" +#define NM_SETTING_GSM_INITIAL_EPS_BEARER_USERNAME "initial-eps-bearer-username" +#define NM_SETTING_GSM_INITIAL_EPS_BEARER_PASSWORD "initial-eps-bearer-password" +#define NM_SETTING_GSM_INITIAL_EPS_BEARER_PASSWORD_FLAGS "initial-eps-bearer-password-flags" +#define NM_SETTING_GSM_INITIAL_EPS_BEARER_NOAUTH "initial-eps-bearer-noauth" +#define NM_SETTING_GSM_INITIAL_EPS_BEARER_REFUSE_EAP "initial-eps-bearer-refuse-eap" +#define NM_SETTING_GSM_INITIAL_EPS_BEARER_REFUSE_PAP "initial-eps-bearer-refuse-pap" +#define NM_SETTING_GSM_INITIAL_EPS_BEARER_REFUSE_CHAP "initial-eps-bearer-refuse-chap" +#define NM_SETTING_GSM_INITIAL_EPS_BEARER_REFUSE_MSCHAP "initial-eps-bearer-refuse-mschap" +#define NM_SETTING_GSM_INITIAL_EPS_BEARER_REFUSE_MSCHAPV2 "initial-eps-bearer-refuse-mschapv2" /* Deprecated */ #define NM_SETTING_GSM_NUMBER "number" @@ -73,6 +82,22 @@ NM_AVAILABLE_IN_1_44 gboolean nm_setting_gsm_get_initial_eps_config(NMSettingGsm *setting); NM_AVAILABLE_IN_1_44 const char *nm_setting_gsm_get_initial_eps_apn(NMSettingGsm *setting); +NM_AVAILABLE_IN_1_52 +const char *nm_setting_gsm_get_initial_eps_username(NMSettingGsm *setting); +NM_AVAILABLE_IN_1_52 +const char *nm_setting_gsm_get_initial_eps_password(NMSettingGsm *setting); +NM_AVAILABLE_IN_1_52 +gboolean nm_setting_gsm_get_initial_eps_noauth(NMSettingGsm *setting); +NM_AVAILABLE_IN_1_52 +gboolean nm_setting_gsm_get_initial_eps_refuse_eap(NMSettingGsm *setting); +NM_AVAILABLE_IN_1_52 +gboolean nm_setting_gsm_get_initial_eps_refuse_pap(NMSettingGsm *setting); +NM_AVAILABLE_IN_1_52 +gboolean nm_setting_gsm_get_initial_eps_refuse_chap(NMSettingGsm *setting); +NM_AVAILABLE_IN_1_52 +gboolean nm_setting_gsm_get_initial_eps_refuse_mschap(NMSettingGsm *setting); +NM_AVAILABLE_IN_1_52 +gboolean nm_setting_gsm_get_initial_eps_refuse_mschapv2(NMSettingGsm *setting); NM_DEPRECATED_IN_1_16 const char *nm_setting_gsm_get_number(NMSettingGsm *setting); diff --git a/src/libnmc-setting/nm-meta-setting-desc.c b/src/libnmc-setting/nm-meta-setting-desc.c index 01aa271db..d3fd535d7 100644 --- a/src/libnmc-setting/nm-meta-setting-desc.c +++ b/src/libnmc-setting/nm-meta-setting-desc.c @@ -6045,6 +6045,34 @@ static const NMMetaPropertyInfo *const property_infos_GSM[] = { PROPERTY_INFO_WITH_DESC (NM_SETTING_GSM_INITIAL_EPS_BEARER_APN, .property_type = &_pt_gobject_string, ), + PROPERTY_INFO_WITH_DESC (NM_SETTING_GSM_INITIAL_EPS_BEARER_USERNAME, + .property_type = &_pt_gobject_string, + ), + PROPERTY_INFO_WITH_DESC (NM_SETTING_GSM_INITIAL_EPS_BEARER_PASSWORD, + .is_secret = TRUE, + .property_type = &_pt_gobject_string, + ), + PROPERTY_INFO_WITH_DESC (NM_SETTING_GSM_INITIAL_EPS_BEARER_PASSWORD_FLAGS, + .property_type = &_pt_gobject_secret_flags, + ), + PROPERTY_INFO_WITH_DESC (NM_SETTING_GSM_INITIAL_EPS_BEARER_NOAUTH, + .property_type = &_pt_gobject_bool, + ), + PROPERTY_INFO_WITH_DESC (NM_SETTING_GSM_INITIAL_EPS_BEARER_REFUSE_EAP, + .property_type = &_pt_gobject_bool, + ), + PROPERTY_INFO_WITH_DESC (NM_SETTING_GSM_INITIAL_EPS_BEARER_REFUSE_PAP, + .property_type = &_pt_gobject_bool, + ), + PROPERTY_INFO_WITH_DESC (NM_SETTING_GSM_INITIAL_EPS_BEARER_REFUSE_CHAP, + .property_type = &_pt_gobject_bool, + ), + PROPERTY_INFO_WITH_DESC (NM_SETTING_GSM_INITIAL_EPS_BEARER_REFUSE_MSCHAP, + .property_type = &_pt_gobject_bool, + ), + PROPERTY_INFO_WITH_DESC (NM_SETTING_GSM_INITIAL_EPS_BEARER_REFUSE_MSCHAPV2, + .property_type = &_pt_gobject_bool, + ), NULL }; diff --git a/src/libnmc-setting/settings-docs.h.in b/src/libnmc-setting/settings-docs.h.in index 8198caa45..db693cd50 100644 --- a/src/libnmc-setting/settings-docs.h.in +++ b/src/libnmc-setting/settings-docs.h.in @@ -149,6 +149,15 @@ #define DESCRIBE_DOC_NM_SETTING_GSM_HOME_ONLY N_("When TRUE, only connections to the home network will be allowed. Connections to roaming networks will not be made.") #define DESCRIBE_DOC_NM_SETTING_GSM_INITIAL_EPS_BEARER_APN N_("For LTE modems, this sets the APN for the initial EPS bearer that is set up when attaching to the network. Setting this parameter implies initial-eps-bearer-configure to be TRUE.") #define DESCRIBE_DOC_NM_SETTING_GSM_INITIAL_EPS_BEARER_CONFIGURE N_("For LTE modems, this setting determines whether the initial EPS bearer shall be configured when bringing up the connection. It is inferred TRUE if initial-eps-bearer-apn is set.") +#define DESCRIBE_DOC_NM_SETTING_GSM_INITIAL_EPS_BEARER_NOAUTH N_("For LTE modems, this sets NOAUTH authentication method for the initial EPS bearer that is set up when attaching to the network. If TRUE, do not require the other side to authenticate itself to the client. If FALSE, require authentication from the remote side. In almost all cases, this should be TRUE.") +#define DESCRIBE_DOC_NM_SETTING_GSM_INITIAL_EPS_BEARER_PASSWORD N_("For LTE modems, this sets the password for the initial EPS bearer that is set up when attaching to the network. Setting this parameter implies initial-eps-bearer-configure to be TRUE.") +#define DESCRIBE_DOC_NM_SETTING_GSM_INITIAL_EPS_BEARER_PASSWORD_FLAGS N_("Flags indicating how to handle the \"initial-eps-bearer-password\" property.") +#define DESCRIBE_DOC_NM_SETTING_GSM_INITIAL_EPS_BEARER_REFUSE_CHAP N_("For LTE modems, this disables CHAP authentication method for the initial EPS bearer that is set up when attaching to the network.") +#define DESCRIBE_DOC_NM_SETTING_GSM_INITIAL_EPS_BEARER_REFUSE_EAP N_("For LTE modems, this disables EAP authentication method for the initial EPS bearer that is set up when attaching to the network.") +#define DESCRIBE_DOC_NM_SETTING_GSM_INITIAL_EPS_BEARER_REFUSE_MSCHAP N_("For LTE modems, this disables MSCHAP authentication method for the initial EPS bearer that is set up when attaching to the network.") +#define DESCRIBE_DOC_NM_SETTING_GSM_INITIAL_EPS_BEARER_REFUSE_MSCHAPV2 N_("For LTE modems, this disables MSCHAPV2 authentication method for the initial EPS bearer that is set up when attaching to the network.") +#define DESCRIBE_DOC_NM_SETTING_GSM_INITIAL_EPS_BEARER_REFUSE_PAP N_("For LTE modems, this disables PAP authentication method for the initial EPS bearer that is set up when attaching to the network.") +#define DESCRIBE_DOC_NM_SETTING_GSM_INITIAL_EPS_BEARER_USERNAME N_("For LTE modems, this sets the username for the initial EPS bearer that is set up when attaching to the network. Setting this parameter implies initial-eps-bearer-configure to be TRUE.") #define DESCRIBE_DOC_NM_SETTING_GSM_MTU N_("If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple frames.") #define DESCRIBE_DOC_NM_SETTING_GSM_NETWORK_ID N_("The Network ID (GSM LAI format, ie MCC-MNC) to force specific network registration. If the Network ID is specified, NetworkManager will attempt to force the device to register only on the specified network. This can be used to ensure that the device does not roam when direct roaming control of the device is not otherwise possible.") #define DESCRIBE_DOC_NM_SETTING_GSM_NUMBER N_("Legacy setting that used to help establishing PPP data sessions for GSM-based modems.") diff --git a/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in b/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in index e6018a8ad..736b5b3f2 100644 --- a/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in +++ b/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in @@ -1149,6 +1149,40 @@ + + + + + + + + + >> connection.id: con-gsm1 connection.uuid: UUID-con-gsm1-REPLACED-REPLACED-REPL @@ -304,18 +304,27 @@ gsm.sim-operator-id: -- gsm.mtu: auto gsm.initial-eps-bearer-configure: no gsm.initial-eps-bearer-apn: -- +gsm.initial-eps-bearer-username: -- +gsm.initial-eps-bearer-password: +gsm.initial-eps-bearer-password-flags: 0 (none) +gsm.initial-eps-bearer-noauth: yes +gsm.initial-eps-bearer-refuse-eap: no +gsm.initial-eps-bearer-refuse-pap: no +gsm.initial-eps-bearer-refuse-chap: no +gsm.initial-eps-bearer-refuse-mschap: no +gsm.initial-eps-bearer-refuse-mschapv2: no proxy.method: none proxy.browser-only: no proxy.pac-url: -- proxy.pac-script: -- <<< -size: 5665 +size: 6070 location: src/tests/client/test-client.py:test_003()/15 cmd: $NMCLI con s con-gsm1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 5522 bytes +stdout: 5927 bytes >>> connection.id: con-gsm1 connection.uuid: UUID-con-gsm1-REPLACED-REPLACED-REPL @@ -432,48 +441,57 @@ gsm.sim-operator-id: -- gsm.mtu: automatyczne gsm.initial-eps-bearer-configure: nie gsm.initial-eps-bearer-apn: -- +gsm.initial-eps-bearer-username: -- +gsm.initial-eps-bearer-password: +gsm.initial-eps-bearer-password-flags: 0 (brak) +gsm.initial-eps-bearer-noauth: tak +gsm.initial-eps-bearer-refuse-eap: nie +gsm.initial-eps-bearer-refuse-pap: nie +gsm.initial-eps-bearer-refuse-chap: nie +gsm.initial-eps-bearer-refuse-mschap: nie +gsm.initial-eps-bearer-refuse-mschapv2: nie proxy.method: none proxy.browser-only: nie proxy.pac-url: -- proxy.pac-script: -- <<< -size: 526 +size: 557 location: src/tests/client/test-client.py:test_003()/16 cmd: $NMCLI -g all con s con-gsm1 lang: C returncode: 0 -stdout: 387 bytes +stdout: 418 bytes >>> connection:con-gsm1:UUID-con-gsm1-REPLACED-REPLACED-REPL::gsm::no:0:-1:0:-1:0:::::::-1:-1:-1::0:unknown:default:-1:-1:-1:0x0:-1:-1 ipv4:auto::: :0::::-1:0::-1:-1:no:no::::0:yes:::0x0:no:yes:-1:-1::0::-1 ipv6:auto::::0::::-1:0::-1:-1:no:no:no:yes:-1:-1:0:0:default:0:auto::::0:yes::0x0:-1: serial:5:8:even:1:100 -gsm:no::::0:xyz.con-gsm1:::0:no::::auto:no: +gsm:no::::0:xyz.con-gsm1:::0:no::::auto:no::::0:yes:no:no:no:no:no proxy:none:no:: <<< -size: 536 +size: 567 location: src/tests/client/test-client.py:test_003()/17 cmd: $NMCLI -g all con s con-gsm1 lang: pl_PL.UTF-8 returncode: 0 -stdout: 387 bytes +stdout: 418 bytes >>> connection:con-gsm1:UUID-con-gsm1-REPLACED-REPLACED-REPL::gsm::no:0:-1:0:-1:0:::::::-1:-1:-1::0:unknown:default:-1:-1:-1:0x0:-1:-1 ipv4:auto::: :0::::-1:0::-1:-1:no:no::::0:yes:::0x0:no:yes:-1:-1::0::-1 ipv6:auto::::0::::-1:0::-1:-1:no:no:no:yes:-1:-1:0:0:default:0:auto::::0:yes::0x0:-1: serial:5:8:even:1:100 -gsm:no::::0:xyz.con-gsm1:::0:no::::auto:no: +gsm:no::::0:xyz.con-gsm1:::0:no::::auto:no::::0:yes:no:no:no:no:no proxy:none:no:: <<< -size: 5615 +size: 6015 location: src/tests/client/test-client.py:test_003()/18 cmd: $NMCLI con s con-gsm2 lang: C returncode: 0 -stdout: 5482 bytes +stdout: 5882 bytes >>> connection.id: con-gsm2 connection.uuid: UUID-con-gsm2-REPLACED-REPLACED-REPL @@ -590,18 +608,27 @@ gsm.sim-operator-id: -- gsm.mtu: auto gsm.initial-eps-bearer-configure: no gsm.initial-eps-bearer-apn: -- +gsm.initial-eps-bearer-username: -- +gsm.initial-eps-bearer-password: +gsm.initial-eps-bearer-password-flags: 0 (none) +gsm.initial-eps-bearer-noauth: yes +gsm.initial-eps-bearer-refuse-eap: no +gsm.initial-eps-bearer-refuse-pap: no +gsm.initial-eps-bearer-refuse-chap: no +gsm.initial-eps-bearer-refuse-mschap: no +gsm.initial-eps-bearer-refuse-mschapv2: no proxy.method: none proxy.browser-only: no proxy.pac-url: -- proxy.pac-script: -- <<< -size: 5653 +size: 6058 location: src/tests/client/test-client.py:test_003()/19 cmd: $NMCLI con s con-gsm2 lang: pl_PL.UTF-8 returncode: 0 -stdout: 5510 bytes +stdout: 5915 bytes >>> connection.id: con-gsm2 connection.uuid: UUID-con-gsm2-REPLACED-REPLACED-REPL @@ -718,48 +745,57 @@ gsm.sim-operator-id: -- gsm.mtu: automatyczne gsm.initial-eps-bearer-configure: nie gsm.initial-eps-bearer-apn: -- +gsm.initial-eps-bearer-username: -- +gsm.initial-eps-bearer-password: +gsm.initial-eps-bearer-password-flags: 0 (brak) +gsm.initial-eps-bearer-noauth: tak +gsm.initial-eps-bearer-refuse-eap: nie +gsm.initial-eps-bearer-refuse-pap: nie +gsm.initial-eps-bearer-refuse-chap: nie +gsm.initial-eps-bearer-refuse-mschap: nie +gsm.initial-eps-bearer-refuse-mschapv2: nie proxy.method: none proxy.browser-only: nie proxy.pac-url: -- proxy.pac-script: -- <<< -size: 514 +size: 545 location: src/tests/client/test-client.py:test_003()/20 cmd: $NMCLI -g all con s con-gsm2 lang: C returncode: 0 -stdout: 375 bytes +stdout: 406 bytes >>> connection:con-gsm2:UUID-con-gsm2-REPLACED-REPLACED-REPL::gsm::no:0:-1:0:-1:0:::::::-1:-1:-1::0:unknown:default:-1:-1:-1:0x0:-1:-1 ipv4:auto::: :0::::-1:0::-1:-1:no:no::::0:yes:::0x0:no:yes:-1:-1::0::-1 ipv6:auto::::0::::-1:0::-1:-1:no:no:no:yes:-1:-1:0:0:default:0:auto::::0:yes::0x0:-1: serial:5:8:even:1:100 -gsm:no::::0::::0:no::::auto:no: +gsm:no::::0::::0:no::::auto:no::::0:yes:no:no:no:no:no proxy:none:no:: <<< -size: 524 +size: 555 location: src/tests/client/test-client.py:test_003()/21 cmd: $NMCLI -g all con s con-gsm2 lang: pl_PL.UTF-8 returncode: 0 -stdout: 375 bytes +stdout: 406 bytes >>> connection:con-gsm2:UUID-con-gsm2-REPLACED-REPLACED-REPL::gsm::no:0:-1:0:-1:0:::::::-1:-1:-1::0:unknown:default:-1:-1:-1:0x0:-1:-1 ipv4:auto::: :0::::-1:0::-1:-1:no:no::::0:yes:::0x0:no:yes:-1:-1::0::-1 ipv6:auto::::0::::-1:0::-1:-1:no:no:no:yes:-1:-1:0:0:default:0:auto::::0:yes::0x0:-1: serial:5:8:even:1:100 -gsm:no::::0::::0:no::::auto:no: +gsm:no::::0::::0:no::::auto:no::::0:yes:no:no:no:no:no proxy:none:no:: <<< -size: 5615 +size: 6015 location: src/tests/client/test-client.py:test_003()/22 cmd: $NMCLI con s con-gsm3 lang: C returncode: 0 -stdout: 5482 bytes +stdout: 5882 bytes >>> connection.id: con-gsm3 connection.uuid: UUID-con-gsm3-REPLACED-REPLACED-REPL @@ -876,18 +912,27 @@ gsm.sim-operator-id: -- gsm.mtu: auto gsm.initial-eps-bearer-configure: no gsm.initial-eps-bearer-apn: -- +gsm.initial-eps-bearer-username: -- +gsm.initial-eps-bearer-password: +gsm.initial-eps-bearer-password-flags: 0 (none) +gsm.initial-eps-bearer-noauth: yes +gsm.initial-eps-bearer-refuse-eap: no +gsm.initial-eps-bearer-refuse-pap: no +gsm.initial-eps-bearer-refuse-chap: no +gsm.initial-eps-bearer-refuse-mschap: no +gsm.initial-eps-bearer-refuse-mschapv2: no proxy.method: none proxy.browser-only: no proxy.pac-url: -- proxy.pac-script: -- <<< -size: 5653 +size: 6058 location: src/tests/client/test-client.py:test_003()/23 cmd: $NMCLI con s con-gsm3 lang: pl_PL.UTF-8 returncode: 0 -stdout: 5510 bytes +stdout: 5915 bytes >>> connection.id: con-gsm3 connection.uuid: UUID-con-gsm3-REPLACED-REPLACED-REPL @@ -1004,39 +1049,48 @@ gsm.sim-operator-id: -- gsm.mtu: automatyczne gsm.initial-eps-bearer-configure: nie gsm.initial-eps-bearer-apn: -- +gsm.initial-eps-bearer-username: -- +gsm.initial-eps-bearer-password: +gsm.initial-eps-bearer-password-flags: 0 (brak) +gsm.initial-eps-bearer-noauth: tak +gsm.initial-eps-bearer-refuse-eap: nie +gsm.initial-eps-bearer-refuse-pap: nie +gsm.initial-eps-bearer-refuse-chap: nie +gsm.initial-eps-bearer-refuse-mschap: nie +gsm.initial-eps-bearer-refuse-mschapv2: nie proxy.method: none proxy.browser-only: nie proxy.pac-url: -- proxy.pac-script: -- <<< -size: 515 +size: 546 location: src/tests/client/test-client.py:test_003()/24 cmd: $NMCLI -g all con s con-gsm3 lang: C returncode: 0 -stdout: 376 bytes +stdout: 407 bytes >>> connection:con-gsm3:UUID-con-gsm3-REPLACED-REPLACED-REPL::gsm::no:0:-1:0:-1:0:::::::-1:-1:-1::0:unknown:default:-1:-1:-1:0x0:-1:-1 ipv4:auto::: :0::::-1:0::-1:-1:no:no::::0:yes:::0x0:no:yes:-1:-1::0::-1 ipv6:auto::::0::::-1:0::-1:-1:no:no:no:yes:-1:-1:0:0:default:0:auto::::0:yes::0x0:-1: serial:5:8:even:1:100 -gsm:no::::0: :::0:no::::auto:no: +gsm:no::::0: :::0:no::::auto:no::::0:yes:no:no:no:no:no proxy:none:no:: <<< -size: 525 +size: 556 location: src/tests/client/test-client.py:test_003()/25 cmd: $NMCLI -g all con s con-gsm3 lang: pl_PL.UTF-8 returncode: 0 -stdout: 376 bytes +stdout: 407 bytes >>> connection:con-gsm3:UUID-con-gsm3-REPLACED-REPLACED-REPL::gsm::no:0:-1:0:-1:0:::::::-1:-1:-1::0:unknown:default:-1:-1:-1:0x0:-1:-1 ipv4:auto::: :0::::-1:0::-1:-1:no:no::::0:yes:::0x0:no:yes:-1:-1::0::-1 ipv6:auto::::0::::-1:0::-1:-1:no:no:no:yes:-1:-1:0:0:default:0:auto::::0:yes::0x0:-1: serial:5:8:even:1:100 -gsm:no::::0: :::0:no::::auto:no: +gsm:no::::0: :::0:no::::auto:no::::0:yes:no:no:no:no:no proxy:none:no:: <<< From c0ac67233649d583e89fd1c2a4320f2c6bce18f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8D=C3=B1igo=20Huguet?= Date: Thu, 17 Oct 2024 07:56:04 +0200 Subject: [PATCH 2/2] NEWS: update with LTE's EPS bearer changes --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index c328669d1..4f8ba6ab1 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,7 @@ USE AT YOUR OWN RISK. NOT RECOMMENDED FOR PRODUCTION USE! when no other IPv4 is set. * Remove support for building with Autotools * Add IPVLAN interface support +* Allow to manually configure the authentication of LTE's initial EPS Bearer. ============================================= NetworkManager-1.50