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
71b1af34
Commit
71b1af34
authored
Apr 12, 2022
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix 5G Guti
parent
b3e39c17
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
30 deletions
+23
-30
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+3
-1
src/nas/ies/5GSMobilityIdentity.cpp
src/nas/ies/5GSMobilityIdentity.cpp
+6
-24
src/nas/msgs/DeregistrationRequest.cpp
src/nas/msgs/DeregistrationRequest.cpp
+7
-3
src/nas/msgs/RegistrationRequest.cpp
src/nas/msgs/RegistrationRequest.cpp
+7
-2
No files found.
src/amf-app/amf_n1.cpp
View file @
71b1af34
...
...
@@ -1040,9 +1040,10 @@ void amf_n1::registration_request_handle(
case
_5G_GUTI
:
{
guti
=
registration_request
->
get_5g_guti
();
Logger
::
amf_n1
().
debug
(
"Decoded GUTI from registration request message"
);
if
(
!
guti
.
compare
(
"error"
))
{
if
(
guti
.
empty
(
))
{
Logger
::
amf_n1
().
warn
(
"No GUTI IE"
);
}
if
(
nc
.
get
())
{
nc
.
get
()
->
is_5g_guti_present
=
true
;
nc
.
get
()
->
to_be_register_by_new_suci
=
true
;
...
...
@@ -2949,6 +2950,7 @@ void amf_n1::ue_initiate_de_registration_handle(
// Remove NC context
remove_amf_ue_ngap_id_2_nas_context
(
amf_ue_ngap_id
);
remove_imsi_2_nas_context
(
supi
);
remove_guti_2_nas_context
(
dereg_request
->
get_5g_guti
());
// TODO: AMF to AN: N2 UE Context Release Request
...
...
src/nas/ies/5GSMobilityIdentity.cpp
View file @
71b1af34
...
...
@@ -684,30 +684,12 @@ int _5GSMobilityIdentity::_5g_guti_decodefrombuffer(uint8_t* buf, int len) {
decoded_size
++
;
_5g_guti
->
amf_pointer
=
*
(
buf
+
decoded_size
);
decoded_size
++
;
uint32_t
tmsi
=
0
;
uint8_t
digit
[
4
];
octet
=
*
(
buf
+
decoded_size
);
decoded_size
++
;
Logger
::
nas_mm
().
debug
(
"Octet 0x%x"
,
octet
);
digit
[
0
]
=
octet
;
tmsi
|=
octet
;
octet
=
*
(
buf
+
decoded_size
);
decoded_size
++
;
Logger
::
nas_mm
().
debug
(
"Octet 0x%x"
,
octet
);
digit
[
1
]
=
octet
;
tmsi
|=
octet
<<
8
;
octet
=
*
(
buf
+
decoded_size
);
decoded_size
++
;
Logger
::
nas_mm
().
debug
(
"Octet 0x%x"
,
octet
);
digit
[
2
]
=
octet
;
tmsi
|=
octet
<<
16
;
octet
=
*
(
buf
+
decoded_size
);
decoded_size
++
;
Logger
::
nas_mm
().
debug
(
"Octet 0x%x"
,
octet
);
digit
[
3
]
=
octet
;
tmsi
|=
octet
<<
24
;
_5g_guti
->
_5g_tmsi
=
tmsi
;
Logger
::
nas_mm
().
debug
(
"decoding 5GSMobilityIdentity 5G-GUTI"
);
// TMSI, 4 octets
DECODE_U32
(
buf
+
decoded_size
,
_5g_guti
->
_5g_tmsi
,
decoded_size
);
Logger
::
nas_mm
().
debug
(
"TMSI 0x%x"
,
_5g_guti
->
_5g_tmsi
);
Logger
::
nas_mm
().
debug
(
"Decoding 5GSMobilityIdentity 5G-GUTI"
);
return
decoded_size
;
}
...
...
src/nas/msgs/DeregistrationRequest.cpp
View file @
71b1af34
...
...
@@ -132,10 +132,14 @@ std::string DeregistrationRequest::get_5g_guti() {
if
(
ie_5gs_mobility_id
)
{
nas
::
_5G_GUTI_t
guti
;
ie_5gs_mobility_id
->
get5GGUTI
(
guti
);
std
::
string
str
;
//= guti.toString();
return
str
;
std
::
string
guti_str
=
guti
.
mcc
+
guti
.
mnc
+
std
::
to_string
(
guti
.
amf_region_id
)
+
std
::
to_string
(
guti
.
amf_set_id
)
+
std
::
to_string
(
guti
.
amf_pointer
)
+
std
::
to_string
(
guti
.
_5g_tmsi
);
Logger
::
nas_mm
().
debug
(
"5G GUTI %s"
,
guti_str
.
c_str
());
return
guti_str
;
}
else
{
return
"
error
"
;
return
""
;
}
}
...
...
src/nas/msgs/RegistrationRequest.cpp
View file @
71b1af34
...
...
@@ -142,9 +142,14 @@ std::string RegistrationRequest::get_5g_guti() {
if
(
ie_5gs_mobility_id
)
{
nas
::
_5G_GUTI_t
guti
;
ie_5gs_mobility_id
->
get5GGUTI
(
guti
);
return
"1234567890"
;
std
::
string
guti_str
=
guti
.
mcc
+
guti
.
mnc
+
std
::
to_string
(
guti
.
amf_region_id
)
+
std
::
to_string
(
guti
.
amf_set_id
)
+
std
::
to_string
(
guti
.
amf_pointer
)
+
std
::
to_string
(
guti
.
_5g_tmsi
);
Logger
::
nas_mm
().
debug
(
"5G GUTI %s"
,
guti_str
.
c_str
());
return
guti_str
;
}
else
{
return
"
error
"
;
return
""
;
}
}
...
...
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