Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-AMF
Commits
5ec6988a
Commit
5ec6988a
authored
Mar 29, 2023
by
Giulio Carota
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check if the UE Ctx Rel complete sender is HO src gNB
parent
c118e991
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
12 deletions
+22
-12
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+19
-9
src/contexts/ue_ngap_context.hpp
src/contexts/ue_ngap_context.hpp
+3
-3
No files found.
src/amf-app/amf_n2.cpp
View file @
5ec6988a
...
@@ -1310,21 +1310,21 @@ void amf_n2::handle_itti_message(itti_ue_context_release_complete& itti_msg) {
...
@@ -1310,21 +1310,21 @@ void amf_n2::handle_itti_message(itti_ue_context_release_complete& itti_msg) {
}
}
std
::
shared_ptr
<
ue_ngap_context
>
unc
=
{};
std
::
shared_ptr
<
ue_ngap_context
>
unc
=
{};
if
(
!
amf_ue_id_2_ue_ngap_context
(
amf_ue_ngap_id
,
unc
))
{
if
(
!
amf_ue_id_2_ue_ngap_context
(
amf_ue_ngap_id
,
unc
))
{
Logger
::
amf_app
().
error
(
Logger
::
amf_app
().
error
(
"No UE NGAP context for amf_ngap_id %s, exit"
,
amf_ue_ngap_id
);
"No UE NGAP context for amf_ngap_id %s, exit"
,
amf_ue_ngap_id
);
return
;
return
;
}
}
//verify release cause -> if HandoverSuccessful no further operations required
std
::
shared_ptr
<
gnb_context
>
gc
=
{};
if
(
unc
->
release_cause
==
Ngap_CauseRadioNetwork_successful_handover
){
std
::
shared_ptr
<
gnb_context
>
gc
=
{};
if
(
!
assoc_id_2_gnb_context
(
itti_msg
.
assoc_id
,
gc
))
{
if
(
!
assoc_id_2_gnb_context
(
itti_msg
.
assoc_id
,
gc
))
{
Logger
::
amf_n2
().
error
(
Logger
::
amf_n2
().
error
(
"gNB with assoc_id (%d) is illegal"
,
itti_msg
.
assoc_id
);
"gNB with assoc_id (%d) is illegal"
,
itti_msg
.
assoc_id
);
return
;
return
;
}
}
//verify release cause -> if HandoverSuccessful no further operations required
if
(
unc
->
release_cause
==
Ngap_CauseRadioNetwork_successful_handover
&&
gc
->
gnb_id
==
unc
->
release_gnb
){
remove_ran_ue_ngap_id_2_ngap_context
(
ran_ue_ngap_id
,
gc
->
gnb_id
);
remove_ran_ue_ngap_id_2_ngap_context
(
ran_ue_ngap_id
,
gc
->
gnb_id
);
unc
->
release_cause
=
0
;
unc
->
release_cause
=
0
;
return
;
return
;
...
@@ -2046,20 +2046,30 @@ void amf_n2::handle_itti_message(itti_handover_notify& itti_msg) {
...
@@ -2046,20 +2046,30 @@ void amf_n2::handle_itti_message(itti_handover_notify& itti_msg) {
sctp_s_38412
.
sctp_send_msg
(
unc
->
gnb_assoc_id
,
0
,
&
b
);
sctp_s_38412
.
sctp_send_msg
(
unc
->
gnb_assoc_id
,
0
,
&
b
);
bdestroy_wrapper
(
&
b
);
bdestroy_wrapper
(
&
b
);
if
(
!
amf_ue_id_2_ue_ngap_context
(
amf_ue_ngap_id
,
unc
))
{
string
ue_context_key
=
Logger
::
amf_n2
().
error
(
conv
::
get_ue_context_key
(
unc
->
ran_ue_ngap_id
,
amf_ue_ngap_id
);
"No UE NGAP context with amf_ue_ngap_id ("
AMF_UE_NGAP_ID_FMT
")"
,
std
::
shared_ptr
<
ue_context
>
uc
=
{};
amf_ue_ngap_id
);
if
(
!
amf_app_inst
->
ran_amf_id_2_ue_context
(
ue_context_key
,
uc
))
{
Logger
::
amf_app
().
error
(
"No UE context for ran_amf_id %s, exit"
,
ue_context_key
.
c_str
());
return
;
return
;
}
}
//update the NGAP Context
unc
->
release_cause
=
Ngap_CauseRadioNetwork_successful_handover
;
unc
->
release_cause
=
Ngap_CauseRadioNetwork_successful_handover
;
unc
->
last_ran_ue_ngap_id
=
unc
->
ran_ue_ngap
_id
;
unc
->
release_gnb
=
uc
->
gnb
_id
;
unc
->
ran_ue_ngap_id
=
ran_ue_ngap_id
;
// store new RAN ID
unc
->
ran_ue_ngap_id
=
ran_ue_ngap_id
;
// store new RAN ID
unc
->
target_ran_ue_ngap_id
=
0
;
// Clear target RAN ID
unc
->
target_ran_ue_ngap_id
=
0
;
// Clear target RAN ID
unc
->
ng_ue_state
=
NGAP_UE_CONNECTED
;
unc
->
ng_ue_state
=
NGAP_UE_CONNECTED
;
unc
->
gnb_assoc_id
=
itti_msg
.
assoc_id
;
// update serving gNB
unc
->
gnb_assoc_id
=
itti_msg
.
assoc_id
;
// update serving gNB
//update NAS Context
nc
->
ran_ue_ngap_id
=
ran_ue_ngap_id
;
//update User Context
uc
->
ran_ue_ngap_id
=
ran_ue_ngap_id
;
uc
->
gnb_id
=
gc
->
gnb_id
;
set_ran_ue_ngap_id_2_ue_ngap_context
(
ran_ue_ngap_id
,
gc
->
gnb_id
,
unc
);
set_ran_ue_ngap_id_2_ue_ngap_context
(
ran_ue_ngap_id
,
gc
->
gnb_id
,
unc
);
}
}
...
...
src/contexts/ue_ngap_context.hpp
View file @
5ec6988a
...
@@ -44,11 +44,11 @@ class ue_ngap_context {
...
@@ -44,11 +44,11 @@ class ue_ngap_context {
ran_ue_ngap_id
=
0
;
ran_ue_ngap_id
=
0
;
amf_ue_ngap_id
=
0
;
amf_ue_ngap_id
=
0
;
target_ran_ue_ngap_id
=
0
;
target_ran_ue_ngap_id
=
0
;
last_ran_ue_ngap_id
=
0
;
sctp_stream_recv
=
{};
sctp_stream_recv
=
{};
sctp_stream_send
=
{};
sctp_stream_send
=
{};
release_gnb
=
{};
release_cause
=
{};
release_cause
=
{};
gnb_assoc_id
=
{};
gnb_assoc_id
=
{};
target_gnb_assoc_id
=
{};
target_gnb_assoc_id
=
{};
...
@@ -69,7 +69,6 @@ class ue_ngap_context {
...
@@ -69,7 +69,6 @@ class ue_ngap_context {
initialUEMsg
.
size
=
0
;
initialUEMsg
.
size
=
0
;
}
}
uint32_t
last_ran_ue_ngap_id
;
uint32_t
ran_ue_ngap_id
;
// 32bits
uint32_t
ran_ue_ngap_id
;
// 32bits
long
amf_ue_ngap_id
:
40
;
// 40bits
long
amf_ue_ngap_id
:
40
;
// 40bits
uint32_t
target_ran_ue_ngap_id
;
// 32bits, for HO
uint32_t
target_ran_ue_ngap_id
;
// 32bits, for HO
...
@@ -95,8 +94,9 @@ class ue_ngap_context {
...
@@ -95,8 +94,9 @@ class ue_ngap_context {
OCTET_STRING_t
initialUEMsg
;
OCTET_STRING_t
initialUEMsg
;
//
store the cause of Release Command
//
Release Command Cause and source gNB ID in case of HO
Ngap_CauseRadioNetwork_t
release_cause
;
Ngap_CauseRadioNetwork_t
release_cause
;
uint32_t
release_gnb
;
};
};
#endif
#endif
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