From f9a8498566cba61829bf995bf2a600d84ee14bf3 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 4 Jan 2024 16:03:11 +0100 Subject: [PATCH] RRC: forward 5G-S-TMSI for NGAP Initial UE Message Only fill the 5G-S-TMSI if if is present, and set the bit in the presenceMask. --- openair2/RRC/NR/rrc_gNB_NGAP.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.c b/openair2/RRC/NR/rrc_gNB_NGAP.c index 60d5f2c413..8bc76c570c 100644 --- a/openair2/RRC/NR/rrc_gNB_NGAP.c +++ b/openair2/RRC/NR/rrc_gNB_NGAP.c @@ -201,10 +201,13 @@ rrc_gNB_send_NGAP_NAS_FIRST_REQ( /* Fill UE identities with available information */ req->ue_identity.presenceMask = NGAP_UE_IDENTITIES_NONE; - /* Fill s-TMSI */ - req->ue_identity.s_tmsi.amf_set_id = UE->Initialue_identity_5g_s_TMSI.amf_set_id; - req->ue_identity.s_tmsi.amf_pointer = UE->Initialue_identity_5g_s_TMSI.amf_pointer; - req->ue_identity.s_tmsi.m_tmsi = UE->Initialue_identity_5g_s_TMSI.fiveg_tmsi; + if (UE->Initialue_identity_5g_s_TMSI.presence) { + /* Fill s-TMSI */ + req->ue_identity.presenceMask = NGAP_UE_IDENTITIES_FiveG_s_tmsi; + req->ue_identity.s_tmsi.amf_set_id = UE->Initialue_identity_5g_s_TMSI.amf_set_id; + req->ue_identity.s_tmsi.amf_pointer = UE->Initialue_identity_5g_s_TMSI.amf_pointer; + req->ue_identity.s_tmsi.m_tmsi = UE->Initialue_identity_5g_s_TMSI.fiveg_tmsi; + } /* selected_plmn_identity: IE is 1-based, convert to 0-based (C array) */ int selected_plmn_identity = rrcSetupComplete->selectedPLMN_Identity - 1;