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
b617d09f
Commit
b617d09f
authored
Oct 12, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix encode/decode GUTI
parent
039bb05d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
src/nas/ies/5GSMobileIdentity.cpp
src/nas/ies/5GSMobileIdentity.cpp
+8
-3
No files found.
src/nas/ies/5GSMobileIdentity.cpp
View file @
b617d09f
...
@@ -347,7 +347,7 @@ int _5GSMobileIdentity::_5g_guti_encode2buffer(uint8_t* buf, int len) {
...
@@ -347,7 +347,7 @@ int _5GSMobileIdentity::_5g_guti_encode2buffer(uint8_t* buf, int len) {
_5g_guti
.
value
().
mcc
,
_5g_guti
.
value
().
mnc
,
buf
+
encoded_size
);
_5g_guti
.
value
().
mcc
,
_5g_guti
.
value
().
mnc
,
buf
+
encoded_size
);
ENCODE_U8
(
buf
+
encoded_size
,
_5g_guti
.
value
().
amf_region_id
,
encoded_size
);
ENCODE_U8
(
buf
+
encoded_size
,
_5g_guti
.
value
().
amf_region_id
,
encoded_size
);
ENCODE_U8
(
ENCODE_U8
(
buf
+
encoded_size
,
((
_5g_guti
.
value
().
amf_set_id
&
0x03f
c
)
>>
2
),
buf
+
encoded_size
,
((
_5g_guti
.
value
().
amf_set_id
&
0x03f
f
)
>>
2
),
encoded_size
);
encoded_size
);
ENCODE_U8
(
ENCODE_U8
(
buf
+
encoded_size
,
buf
+
encoded_size
,
...
@@ -704,8 +704,13 @@ int _5GSMobileIdentity::_5g_guti_decodefrombuffer(uint8_t* buf, int len) {
...
@@ -704,8 +704,13 @@ int _5GSMobileIdentity::_5g_guti_decodefrombuffer(uint8_t* buf, int len) {
tmp
.
mnc
=
(
const
std
::
string
)(
mnc_str
);
tmp
.
mnc
=
(
const
std
::
string
)(
mnc_str
);
DECODE_U8
(
buf
+
decoded_size
,
tmp
.
amf_region_id
,
decoded_size
);
DECODE_U8
(
buf
+
decoded_size
,
tmp
.
amf_region_id
,
decoded_size
);
DECODE_U8
(
buf
+
decoded_size
,
tmp
.
amf_set_id
,
decoded_size
);
DECODE_U8
(
buf
+
decoded_size
,
octet
,
decoded_size
);
DECODE_U8
(
buf
+
decoded_size
,
tmp
.
amf_pointer
,
decoded_size
);
tmp
.
amf_set_id
=
octet
<<
2
;
// 8 most significant bits
DECODE_U8
(
buf
+
decoded_size
,
octet
,
decoded_size
);
tmp
.
amf_set_id
|=
((
octet
&
0xc0
)
>>
6
);
// 2 most significant bits of this octet
// as 2 lest significant bits of AMF Set ID
tmp
.
amf_pointer
=
octet
&
0x3f
;
// 6 lest significant bits
// TMSI, 4 octets
// TMSI, 4 octets
DECODE_U32
(
buf
+
decoded_size
,
tmp
.
_5g_tmsi
,
decoded_size
);
DECODE_U32
(
buf
+
decoded_size
,
tmp
.
_5g_tmsi
,
decoded_size
);
...
...
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