Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
spbro
OpenXG-RAN
Commits
27ac2985
Commit
27ac2985
authored
Jul 01, 2024
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/guami-fix' into integration_2024_w26b
parents
52fcd348
0a603a10
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
71 deletions
+77
-71
openair2/RRC/NR/rrc_gNB_NGAP.c
openair2/RRC/NR/rrc_gNB_NGAP.c
+49
-44
openair3/NGAP/ngap_gNB_handlers.c
openair3/NGAP/ngap_gNB_handlers.c
+28
-27
No files found.
openair2/RRC/NR/rrc_gNB_NGAP.c
View file @
27ac2985
...
...
@@ -200,59 +200,55 @@ rrc_gNB_send_NGAP_NAS_FIRST_REQ(
// ue_context_pP);
/* Fill UE identities with available information */
req
->
ue_identity
.
presenceMask
=
NGAP_UE_IDENTITIES_NONE
;
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
;
}
}
else
if
(
rrcSetupComplete
->
registeredAMF
!=
NULL
)
{
NR_RegisteredAMF_t
*
r_amf
=
rrcSetupComplete
->
registeredAMF
;
req
->
ue_identity
.
presenceMask
=
NGAP_UE_IDENTITIES_guami
;
/* The IE AMF-Identifier (AMFI) comprises of an AMF Region ID (8b), an AMF Set ID (10b) and an AMF Pointer (6b) as specified in TS 23.003 [21], clause 2.10.1. */
uint32_t
amf_Id
=
BIT_STRING_to_uint32
(
&
r_amf
->
amf_Identifier
);
req
->
ue_identity
.
guami
.
amf_region_id
=
(
amf_Id
>>
16
)
&
0xff
;
req
->
ue_identity
.
guami
.
amf_set_id
=
(
amf_Id
>>
6
)
&
0x3ff
;
req
->
ue_identity
.
guami
.
amf_pointer
=
amf_Id
&
0x3f
;
UE
->
ue_guami
.
amf_region_id
=
req
->
ue_identity
.
guami
.
amf_region_id
;
UE
->
ue_guami
.
amf_set_id
=
req
->
ue_identity
.
guami
.
amf_set_id
;
UE
->
ue_guami
.
amf_pointer
=
req
->
ue_identity
.
guami
.
amf_pointer
;
if
(
r_amf
->
plmn_Identity
!=
NULL
)
{
AssertFatal
(
false
,
"At the moment, OAI RAN does not support multiple PLMN IDs. Therefore, this part has not been tested
\n
"
);
/* selected_plmn_identity: IE is 1-based, convert to 0-based (C array) */
int
selected_plmn_identity
=
rrcSetupComplete
->
selectedPLMN_Identity
-
1
;
req
->
selected_plmn_identity
=
selected_plmn_identity
;
if
((
r_amf
->
plmn_Identity
->
mcc
!=
NULL
)
&&
(
r_amf
->
plmn_Identity
->
mcc
->
list
.
count
>
0
))
{
/* Use first indicated PLMN MCC if it is defined */
req
->
ue_identity
.
guami
.
mcc
=
*
r_amf
->
plmn_Identity
->
mcc
->
list
.
array
[
selected_plmn_identity
];
LOG_I
(
NGAP
,
"[gNB %d] Build NGAP_NAS_FIRST_REQ adding in s_TMSI: GUMMEI MCC %u ue %x
\n
"
,
ctxt_pP
->
module_id
,
req
->
ue_identity
.
guami
.
mcc
,
UE
->
rnti
);
}
/* selected_plmn_identity: IE is 1-based, convert to 0-based (C array) */
int
selected_plmn_identity
=
rrcSetupComplete
->
selectedPLMN_Identity
-
1
;
req
->
selected_plmn_identity
=
selected_plmn_identity
;
if
(
rrcSetupComplete
->
registeredAMF
!=
NULL
)
{
NR_RegisteredAMF_t
*
r_amf
=
rrcSetupComplete
->
registeredAMF
;
req
->
ue_identity
.
presenceMask
|=
NGAP_UE_IDENTITIES_guami
;
if
(
r_amf
->
plmn_Identity
!=
NULL
)
{
if
((
r_amf
->
plmn_Identity
->
mcc
!=
NULL
)
&&
(
r_amf
->
plmn_Identity
->
mcc
->
list
.
count
>
0
))
{
/* Use first indicated PLMN MCC if it is defined */
req
->
ue_identity
.
guami
.
mcc
=
*
r_amf
->
plmn_Identity
->
mcc
->
list
.
array
[
selected_plmn_identity
];
LOG_I
(
NGAP
,
"[gNB %d] Build NGAP_NAS_FIRST_REQ adding in s_TMSI: GUMMEI MCC %u ue %x
\n
"
,
ctxt_pP
->
module_id
,
req
->
ue_identity
.
guami
.
mcc
,
UE
->
rnti
);
}
if
(
r_amf
->
plmn_Identity
->
mnc
.
list
.
count
>
0
)
{
/* Use first indicated PLMN MNC if it is defined */
req
->
ue_identity
.
guami
.
mnc
=
*
r_amf
->
plmn_Identity
->
mnc
.
list
.
array
[
selected_plmn_identity
];
LOG_I
(
NGAP
,
"[gNB %d] Build NGAP_NAS_FIRST_REQ adding in s_TMSI: GUMMEI MNC %u ue %x
\n
"
,
ctxt_pP
->
module_id
,
req
->
ue_identity
.
guami
.
mnc
,
UE
->
rnti
);
}
}
else
{
/* TODO */
if
(
r_amf
->
plmn_Identity
->
mnc
.
list
.
count
>
0
)
{
/* Use first indicated PLMN MNC if it is defined */
req
->
ue_identity
.
guami
.
mnc
=
*
r_amf
->
plmn_Identity
->
mnc
.
list
.
array
[
selected_plmn_identity
];
LOG_I
(
NGAP
,
"[gNB %d] Build NGAP_NAS_FIRST_REQ adding in s_TMSI: GUMMEI MNC %u ue %x
\n
"
,
ctxt_pP
->
module_id
,
req
->
ue_identity
.
guami
.
mnc
,
UE
->
rnti
);
}
}
else
{
/* TODO */
}
/* amf_Identifier */
uint32_t
amf_Id
=
BIT_STRING_to_uint32
(
&
r_amf
->
amf_Identifier
);
req
->
ue_identity
.
guami
.
amf_region_id
=
amf_Id
>>
16
;
req
->
ue_identity
.
guami
.
amf_set_id
=
UE
->
Initialue_identity_5g_s_TMSI
.
amf_set_id
;
req
->
ue_identity
.
guami
.
amf_pointer
=
UE
->
Initialue_identity_5g_s_TMSI
.
amf_pointer
;
// fixme: illogical place to set UE values, should be in the function that call this one
UE
->
ue_guami
.
mcc
=
req
->
ue_identity
.
guami
.
mcc
;
UE
->
ue_guami
.
mnc
=
req
->
ue_identity
.
guami
.
mnc
;
UE
->
ue_guami
.
mnc_len
=
req
->
ue_identity
.
guami
.
mnc_len
;
UE
->
ue_guami
.
amf_region_id
=
req
->
ue_identity
.
guami
.
amf_region_id
;
UE
->
ue_guami
.
amf_set_id
=
req
->
ue_identity
.
guami
.
amf_set_id
;
UE
->
ue_guami
.
amf_pointer
=
req
->
ue_identity
.
guami
.
amf_pointer
;
LOG_I
(
NGAP
,
"[gNB %d] Build NGAP_NAS_FIRST_REQ adding in s_TMSI: GUAMI amf_set_id %u amf_region_id %u ue %x
\n
"
,
ctxt_pP
->
module_id
,
req
->
ue_identity
.
guami
.
amf_set_id
,
req
->
ue_identity
.
guami
.
amf_region_id
,
UE
->
rnti
);
LOG_I
(
NGAP
,
"[gNB %d] Build NGAP_NAS_FIRST_REQ adding in s_TMSI: GUAMI amf_set_id %u amf_region_id %u ue %x
\n
"
,
ctxt_pP
->
module_id
,
req
->
ue_identity
.
guami
.
amf_set_id
,
req
->
ue_identity
.
guami
.
amf_region_id
,
UE
->
rnti
);
}
else
{
req
->
ue_identity
.
presenceMask
=
NGAP_UE_IDENTITIES_NONE
;
}
itti_send_msg_to_task
(
TASK_NGAP
,
ctxt_pP
->
instance
,
message_p
);
...
...
@@ -482,6 +478,15 @@ int rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, instance_t
PROTOCOL_CTXT_SET_BY_INSTANCE
(
&
ctxt
,
instance
,
GNB_FLAG_YES
,
UE
->
rrc_ue_id
,
0
,
0
);
UE
->
amf_ue_ngap_id
=
req
->
amf_ue_ngap_id
;
/* store guami in gNB_RRC_UE_t context;
* we copy individual members because the guami types are different (nr_rrc_guami_t and ngap_guami_t) */
UE
->
ue_guami
.
mcc
=
req
->
guami
.
mcc
;
UE
->
ue_guami
.
mnc
=
req
->
guami
.
mnc
;
UE
->
ue_guami
.
mnc_len
=
req
->
guami
.
mnc_len
;
UE
->
ue_guami
.
amf_region_id
=
req
->
guami
.
amf_region_id
;
UE
->
ue_guami
.
amf_set_id
=
req
->
guami
.
amf_set_id
;
UE
->
ue_guami
.
amf_pointer
=
req
->
guami
.
amf_pointer
;
/* NAS PDU */
// this is malloced pointers, we pass it for later free()
UE
->
nas_pdu
=
req
->
nas_pdu
;
...
...
openair3/NGAP/ngap_gNB_handlers.c
View file @
27ac2985
...
...
@@ -740,37 +740,38 @@ static int ngap_gNB_handle_initial_context_request(sctp_assoc_t assoc_id, uint32
NGAP_FIND_PROTOCOLIE_BY_ID
(
NGAP_InitialContextSetupRequestIEs_t
,
ie
,
container
,
NGAP_ProtocolIE_ID_id_GUAMI
,
true
);
TBCD_TO_MCC_MNC
(
&
ie
->
value
.
choice
.
GUAMI
.
pLMNIdentity
,
msg
->
guami
.
mcc
,
msg
->
guami
.
mnc
,
msg
->
guami
.
mnc_len
);
TBCD_TO_MCC_MNC
(
&
ie
->
value
.
choice
.
GUAMI
.
pLMNIdentity
,
msg
->
guami
.
mcc
,
msg
->
guami
.
mnc
,
msg
->
guami
.
mnc_len
);
OCTET_STRING_TO_INT8
(
&
ie
->
value
.
choice
.
GUAMI
.
aMFRegionID
,
msg
->
guami
.
amf_region_id
);
OCTET_STRING_TO_INT16
(
&
ie
->
value
.
choice
.
GUAMI
.
aMFSetID
,
msg
->
guami
.
amf_set_id
);
OCTET_STRING_TO_INT8
(
&
ie
->
value
.
choice
.
GUAMI
.
aMFPointer
,
msg
->
guami
.
amf_pointer
);
NGAP_FIND_PROTOCOLIE_BY_ID
(
NGAP_InitialContextSetupRequestIEs_t
,
ie
,
container
,
NGAP_ProtocolIE_ID_id_PDUSessionResourceSetupListCxtReq
,
false
);
if
(
ie
!=
NULL
)
{
msg
->
nb_of_pdusessions
=
ie
->
value
.
choice
.
PDUSessionResourceSetupListCxtReq
.
list
.
count
;
for
(
i
=
0
;
i
<
ie
->
value
.
choice
.
PDUSessionResourceSetupListCxtReq
.
list
.
count
;
i
++
)
{
NGAP_PDUSessionResourceSetupItemCxtReq_t
*
item_p
=
ie
->
value
.
choice
.
PDUSessionResourceSetupListCxtReq
.
list
.
array
[
i
];
msg
->
pdusession_param
[
i
].
pdusession_id
=
item_p
->
pDUSessionID
;
OCTET_STRING_TO_INT8
(
&
item_p
->
s_NSSAI
.
sST
,
msg
->
pdusession_param
[
i
].
nssai
.
sst
);
if
(
item_p
->
s_NSSAI
.
sD
!=
NULL
)
{
uint8_t
*
sd_p
=
(
uint8_t
*
)
&
msg
->
pdusession_param
[
i
].
nssai
.
sd
;
sd_p
[
0
]
=
item_p
->
s_NSSAI
.
sD
->
buf
[
0
];
sd_p
[
1
]
=
item_p
->
s_NSSAI
.
sD
->
buf
[
1
];
sd_p
[
2
]
=
item_p
->
s_NSSAI
.
sD
->
buf
[
2
];
}
else
{
msg
->
pdusession_param
[
i
].
nssai
.
sd
=
0xffffff
;
}
msg
->
guami
.
amf_region_id
=
BIT_STRING_to_uint8
(
&
ie
->
value
.
choice
.
GUAMI
.
aMFRegionID
);
msg
->
guami
.
amf_set_id
=
BIT_STRING_to_uint16
(
&
ie
->
value
.
choice
.
GUAMI
.
aMFSetID
);
msg
->
guami
.
amf_pointer
=
BIT_STRING_to_uint8
(
&
ie
->
value
.
choice
.
GUAMI
.
aMFPointer
);
if
(
item_p
->
nAS_PDU
)
{
allocCopy
(
&
msg
->
pdusession_param
[
i
].
nas_pdu
,
*
item_p
->
nAS_PDU
);
}
allocCopy
(
&
msg
->
pdusession_param
[
i
].
pdusessionTransfer
,
item_p
->
pDUSessionResourceSetupRequestTransfer
);
NGAP_FIND_PROTOCOLIE_BY_ID
(
NGAP_InitialContextSetupRequestIEs_t
,
ie
,
container
,
NGAP_ProtocolIE_ID_id_PDUSessionResourceSetupListCxtReq
,
false
);
if
(
ie
!=
NULL
)
{
msg
->
nb_of_pdusessions
=
ie
->
value
.
choice
.
PDUSessionResourceSetupListCxtReq
.
list
.
count
;
for
(
i
=
0
;
i
<
ie
->
value
.
choice
.
PDUSessionResourceSetupListCxtReq
.
list
.
count
;
i
++
)
{
NGAP_PDUSessionResourceSetupItemCxtReq_t
*
item_p
=
ie
->
value
.
choice
.
PDUSessionResourceSetupListCxtReq
.
list
.
array
[
i
];
msg
->
pdusession_param
[
i
].
pdusession_id
=
item_p
->
pDUSessionID
;
OCTET_STRING_TO_INT8
(
&
item_p
->
s_NSSAI
.
sST
,
msg
->
pdusession_param
[
i
].
nssai
.
sst
);
if
(
item_p
->
s_NSSAI
.
sD
!=
NULL
)
{
uint8_t
*
sd_p
=
(
uint8_t
*
)
&
msg
->
pdusession_param
[
i
].
nssai
.
sd
;
sd_p
[
0
]
=
item_p
->
s_NSSAI
.
sD
->
buf
[
0
];
sd_p
[
1
]
=
item_p
->
s_NSSAI
.
sD
->
buf
[
1
];
sd_p
[
2
]
=
item_p
->
s_NSSAI
.
sD
->
buf
[
2
];
}
else
{
msg
->
pdusession_param
[
i
].
nssai
.
sd
=
0xffffff
;
}
if
(
item_p
->
nAS_PDU
)
{
allocCopy
(
&
msg
->
pdusession_param
[
i
].
nas_pdu
,
*
item_p
->
nAS_PDU
);
}
allocCopy
(
&
msg
->
pdusession_param
[
i
].
pdusessionTransfer
,
item_p
->
pDUSessionResourceSetupRequestTransfer
);
}
}
/* id-AllowedNSSAI */
NGAP_FIND_PROTOCOLIE_BY_ID
(
NGAP_InitialContextSetupRequestIEs_t
,
ie
,
container
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment