forked from acouzens/open5gs
[MME] [AMF] Add no_time_zone_information param (#2745)
Allow network operators to omit the time zone in the 4G EMM Information and 5G Configuration Update. This is useful for better compatibility with some UEs. The parameter is optional according to: * 4G: 3GPP TS 24.301 Table 8.2.13.1 * 5G: 3GPP TS 24.501 Table 8.2.19.1.1
This commit is contained in:
parent
c6372255d5
commit
5070ddfa3e
|
@ -235,6 +235,10 @@ int ogs_app_parse_global_conf(ogs_yaml_iter_t *parent)
|
|||
"no_pfcp_rr_select")) {
|
||||
global_conf.parameter.no_pfcp_rr_select =
|
||||
ogs_yaml_iter_bool(¶meter_iter);
|
||||
} else if (!strcmp(parameter_key,
|
||||
"no_time_zone_information")) {
|
||||
global_conf.parameter.no_time_zone_information =
|
||||
ogs_yaml_iter_bool(¶meter_iter);
|
||||
} else
|
||||
ogs_warn("unknown key `%s`", parameter_key);
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@ typedef struct ogs_global_conf_s {
|
|||
int no_ipv4v6_local_addr_in_packet_filter;
|
||||
|
||||
int no_pfcp_rr_select;
|
||||
int no_time_zone_information;
|
||||
} parameter;
|
||||
|
||||
struct {
|
||||
|
|
|
@ -551,6 +551,7 @@ ogs_pkbuf_t *gmm_build_configuration_update_command(
|
|||
&amf_self()->short_name, sizeof(ogs_nas_network_name_t));
|
||||
}
|
||||
|
||||
if (!ogs_global_conf()->parameter.no_time_zone_information) {
|
||||
ogs_gettimeofday(&tv);
|
||||
ogs_gmtime(tv.tv_sec, &gmt);
|
||||
ogs_localtime(tv.tv_sec, &local);
|
||||
|
@ -596,6 +597,7 @@ ogs_pkbuf_t *gmm_build_configuration_update_command(
|
|||
OGS_NAS_5GS_CONFIGURATION_UPDATE_COMMAND_NETWORK_DAYLIGHT_SAVING_TIME_PRESENT;
|
||||
network_daylight_saving_time->length = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (param->guti) {
|
||||
configuration_update_command->presencemask |=
|
||||
|
|
|
@ -316,6 +316,7 @@ int emm_handle_attach_complete(
|
|||
&mme_self()->short_name, sizeof(ogs_nas_network_name_t));
|
||||
}
|
||||
|
||||
if (!ogs_global_conf()->parameter.no_time_zone_information) {
|
||||
emm_information->presencemask |=
|
||||
OGS_NAS_EPS_EMM_INFORMATION_LOCAL_TIME_ZONE_PRESENT;
|
||||
|
||||
|
@ -346,6 +347,7 @@ int emm_handle_attach_complete(
|
|||
emm_information->presencemask |=
|
||||
OGS_NAS_EPS_EMM_INFORMATION_NETWORK_DAYLIGHT_SAVING_TIME_PRESENT;
|
||||
network_daylight_saving_time->length = 1;
|
||||
}
|
||||
|
||||
emmbuf = nas_eps_security_encode(mme_ue, &message);
|
||||
if (!emmbuf) {
|
||||
|
|
Loading…
Reference in New Issue