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
75cd6915
Commit
75cd6915
authored
Feb 01, 2023
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue for decoding MSIN with an odd number of digits
parent
eaed3191
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+1
-0
src/nas/ies/5GSMobileIdentity.cpp
src/nas/ies/5GSMobileIdentity.cpp
+15
-1
No files found.
src/amf-app/amf_n1.cpp
View file @
75cd6915
...
...
@@ -1903,6 +1903,7 @@ bool amf_n1::_5g_aka_confirmation_from_ausf(
try
{
ConfirmationDataResponse
confirmationdataresponse
;
response
.
get_to
(
confirmationdataresponse
);
if
(
!
confirmationdataresponse
.
kseafIsSet
())
return
false
;
unsigned
char
*
kseaf_hex
=
conv
::
format_string_as_hex
(
confirmationdataresponse
.
getKseaf
());
memcpy
(
nc
->
_5g_av
[
0
].
kseaf
,
kseaf_hex
,
32
);
...
...
src/nas/ies/5GSMobileIdentity.cpp
View file @
75cd6915
...
...
@@ -373,7 +373,7 @@ int _5GSMobileIdentity::DecodeSuci(uint8_t* buf, int len, int ie_len) {
uint8_t
digit_low
=
0
;
uint8_t
digit_high
=
0
;
int
numMsin
=
ie_len
-
decoded_size
;
for
(
int
i
=
0
;
i
<
numMsin
;
i
++
)
{
for
(
int
i
=
0
;
i
<
(
numMsin
-
1
)
;
i
++
)
{
DECODE_U8
(
buf
+
decoded_size
,
octet
,
decoded_size
);
digit_high
=
(
octet
&
0xf0
)
>>
4
;
digit_low
=
octet
&
0x0f
;
...
...
@@ -381,6 +381,20 @@ int _5GSMobileIdentity::DecodeSuci(uint8_t* buf, int len, int ie_len) {
((
const
std
::
string
)(
std
::
to_string
(
digit_low
))
+
(
const
std
::
string
)(
std
::
to_string
(
digit_high
)));
}
// Verify if the MSIN includes an odd number of digits,
// bits 5 to 8 of the last octet shall be coded as "1111"
DECODE_U8
(
buf
+
decoded_size
,
octet
,
decoded_size
);
digit_high
=
(
octet
&
0xf0
)
>>
4
;
digit_low
=
octet
&
0x0f
;
if
(
digit_high
!=
0x0f
)
{
msin
+=
((
const
std
::
string
)(
std
::
to_string
(
digit_low
))
+
(
const
std
::
string
)(
std
::
to_string
(
digit_high
)));
}
else
{
msin
+=
(
const
std
::
string
)(
std
::
to_string
(
digit_low
));
}
supi_format_imsi_tmp
.
msin
=
msin
;
Logger
::
nas_mm
().
debug
(
"Decoded MSIN %s"
,
supi_format_imsi_tmp
.
msin
.
c_str
());
...
...
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