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
a3f7ac79
Commit
a3f7ac79
authored
Jan 24, 2023
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Mobility Registration Update
parent
4c543016
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
13 deletions
+16
-13
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+16
-13
No files found.
src/amf-app/amf_n1.cpp
View file @
a3f7ac79
...
@@ -3373,19 +3373,28 @@ void amf_n1::sha256(
...
@@ -3373,19 +3373,28 @@ void amf_n1::sha256(
void
amf_n1
::
run_mobility_registration_update_procedure
(
void
amf_n1
::
run_mobility_registration_update_procedure
(
std
::
shared_ptr
<
nas_context
>&
nc
,
uint16_t
uplink_data_status
,
std
::
shared_ptr
<
nas_context
>&
nc
,
uint16_t
uplink_data_status
,
uint16_t
pdu_session_status
)
{
uint16_t
pdu_session_status
)
{
// Encoding REGISTRATION ACCEPT
auto
reg_accept
=
std
::
make_unique
<
RegistrationAccept
>
();
initialize_registration_accept
(
reg_accept
);
reg_accept
->
Set5gsNetworkFeatureSupport
(
0x00
,
0x00
);
// TODO: remove hardcoded values
std
::
shared_ptr
<
pdu_session_context
>
psc
=
{};
std
::
shared_ptr
<
ue_context
>
uc
=
{};
std
::
shared_ptr
<
ue_context
>
uc
=
{};
if
(
!
find_ue_context
(
nc
,
uc
))
{
if
(
!
find_ue_context
(
nc
,
uc
))
{
Logger
::
amf_n1
().
warn
(
"Cannot find the UE context"
);
Logger
::
amf_n1
().
warn
(
"Cannot find the UE context"
);
return
;
return
;
}
}
nas_secu_ctx
*
secu
=
nc
->
security_ctx
;
if
(
!
secu
)
{
Logger
::
amf_n1
().
warn
(
"No Security Context found"
);
// Run Registration procedure
run_registration_procedure
(
nc
);
return
;
}
std
::
shared_ptr
<
pdu_session_context
>
psc
=
{};
// Encoding REGISTRATION ACCEPT
auto
reg_accept
=
std
::
make_unique
<
RegistrationAccept
>
();
initialize_registration_accept
(
reg_accept
);
reg_accept
->
Set5gsNetworkFeatureSupport
(
0x00
,
0x00
);
// TODO: remove hardcoded values
reg_accept
->
Set5gGuti
(
reg_accept
->
Set5gGuti
(
amf_cfg
.
guami
.
mcc
,
amf_cfg
.
guami
.
mnc
,
amf_cfg
.
guami
.
regionID
,
amf_cfg
.
guami
.
mcc
,
amf_cfg
.
guami
.
mnc
,
amf_cfg
.
guami
.
regionID
,
amf_cfg
.
guami
.
AmfSetID
,
amf_cfg
.
guami
.
AmfPointer
,
uc
->
tmsi
);
amf_cfg
.
guami
.
AmfSetID
,
amf_cfg
.
guami
.
AmfPointer
,
uc
->
tmsi
);
...
@@ -3399,12 +3408,6 @@ void amf_n1::run_mobility_registration_update_procedure(
...
@@ -3399,12 +3408,6 @@ void amf_n1::run_mobility_registration_update_procedure(
return
;
return
;
}
}
nas_secu_ctx
*
secu
=
nc
->
security_ctx
;
if
(
!
secu
)
{
Logger
::
amf_n1
().
error
(
"No Security Context found"
);
return
;
}
// protect nas message
// protect nas message
bstring
protected_nas
=
nullptr
;
bstring
protected_nas
=
nullptr
;
encode_nas_message_protected
(
encode_nas_message_protected
(
...
...
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