Skip to content

Commit

Permalink
Fix bug in TAI sorting, limit the TAI list for UE
Browse files Browse the repository at this point in the history
Signed-off-by: Ulas Kozat <kozat@fb.com>
  • Loading branch information
ulaskozat committed May 5, 2021
1 parent 7d33d4a commit 15a4948
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
5 changes: 5 additions & 0 deletions lte/gateway/c/oai/tasks/mme_app/mme_config.c
Expand Up @@ -763,6 +763,11 @@ int mme_config_parse_file(mme_config_t* config_pP) {
config_pP->served_tai.plmn_mnc[i];
config_pP->served_tai.plmn_mnc[i] = swap16;

swap16 = config_pP->served_tai.plmn_mnc_len[i - 1];
config_pP->served_tai.plmn_mnc_len[i - 1] =
config_pP->served_tai.plmn_mnc_len[i];
config_pP->served_tai.plmn_mnc_len[i] = swap16;

swap16 = config_pP->served_tai.tac[i - 1];
config_pP->served_tai.tac[i - 1] = config_pP->served_tai.tac[i];
config_pP->served_tai.tac[i] = swap16;
Expand Down
15 changes: 13 additions & 2 deletions lte/gateway/c/oai/tasks/nas/api/mme/mme_api.c
Expand Up @@ -107,8 +107,9 @@ int mme_api_get_emm_config(
LOG_NAS, "Number of GUMMEIs supported = %d\n", mme_config_p->gummei.nb);

config->tai_list.numberoflists = 0;
// TODO actually we support only one partial TAI list.
// reminder mme_config_p->served_tai is sorted in ascending order of TAIs
// We can store 16 TAIs per list and have 16 partial lists maximum
// As per TS 124.301 V15.4.0 Section 9.9.3.33, we will be sending at most
// 16 TAIs for which UE data is set during
switch (mme_config_p->served_tai.list_type) {
case TRACKING_AREA_IDENTITY_LIST_TYPE_ONE_PLMN_CONSECUTIVE_TACS: {
int tai_list_i = 0, tac_i = 0;
Expand Down Expand Up @@ -529,6 +530,16 @@ int mme_api_new_guti(
0, "BAD TAI list configuration, unknown TAI list type %u",
_emm_data.conf.tai_list.partial_tai_list[i].typeoflist);
}

// TS 124.301 V15.4.0 Section 9.9.3.33:
// "The Tracking area identity list is a type 4 information element,
// with a minimum length of 8 octets and a maximum length of 98 octets.
// The list can contain a maximum of 16 different tracking area identities."
// We will limit the number to 1 partial list which can have maximum of 16
// TAIs.
if (j == 1) {
break; // for loop
}
}
tai_list->numberoflists = j;
OAILOG_INFO(
Expand Down

0 comments on commit 15a4948

Please sign in to comment.