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
691cab6f
Commit
691cab6f
authored
Mar 08, 2022
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Cmake warnings
parent
90d05403
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
8 deletions
+15
-8
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+4
-3
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+8
-4
src/nas/ies/Payload_Container.cpp
src/nas/ies/Payload_Container.cpp
+2
-1
src/ngap/ngapMsgs/RerouteNASRequest.cpp
src/ngap/ngapMsgs/RerouteNASRequest.cpp
+1
-0
No files found.
src/amf-app/amf_n1.cpp
View file @
691cab6f
...
...
@@ -2531,9 +2531,10 @@ void amf_n1::encode_nas_message_protected(
protected_nas_buf
[
0
]
=
EPD_5GS_MM_MSG
;
protected_nas_buf
[
1
]
=
INTEGRITY_PROTECTED_AND_CIPHERED
;
protected_nas_buf
[
6
]
=
(
uint8_t
)
nsc
->
dl_count
.
seq_num
;
// if (bdata(ciphered) != nullptr)
memcpy
(
&
protected_nas_buf
[
7
],
(
uint8_t
*
)
bdata
(
ciphered
),
blength
(
ciphered
));
uint8_t
*
buf_tmp
=
(
uint8_t
*
)
bdata
(
ciphered
);
if
(
buf_tmp
!=
nullptr
)
memcpy
(
&
protected_nas_buf
[
7
],
(
uint8_t
*
)
buf_tmp
,
blength
(
ciphered
));
uint32_t
mac32
;
if
(
!
(
nas_message_integrity_protected
(
...
...
src/amf-app/amf_n2.cpp
View file @
691cab6f
...
...
@@ -907,7 +907,8 @@ void amf_n2::handle_itti_message(itti_initial_context_setup_request& itti_msg) {
if
(
gc
.
get
()
->
ue_radio_cap_ind
)
{
bstring
ueCapability
=
gc
.
get
()
->
ue_radio_cap_ind
;
uint8_t
*
uecap
=
(
uint8_t
*
)
calloc
(
1
,
blength
(
ueCapability
)
+
1
);
memcpy
(
uecap
,
(
uint8_t
*
)
bdata
(
ueCapability
),
blength
(
ueCapability
));
uint8_t
*
buf_tmp
=
(
uint8_t
*
)
bdata
(
ueCapability
);
if
(
buf_tmp
!=
nullptr
)
memcpy
(
uecap
,
buf_tmp
,
blength
(
ueCapability
));
uecap
[
blength
(
ueCapability
)]
=
'\0'
;
msg
->
setUERadioCapability
(
uecap
,
(
size_t
)
blength
(
ueCapability
));
free
(
uecap
);
...
...
@@ -1028,7 +1029,8 @@ void amf_n2::handle_itti_message(
PDUSessionResourceSetupRequestItem_t
item
=
{};
item
.
pduSessionId
=
itti_msg
.
pdu_session_id
;
uint8_t
*
nas_pdu
=
(
uint8_t
*
)
calloc
(
1
,
blength
(
itti_msg
.
nas
)
+
1
);
memcpy
(
nas_pdu
,
(
uint8_t
*
)
bdata
(
itti_msg
.
nas
),
blength
(
itti_msg
.
nas
));
uint8_t
*
buf_tmp
=
(
uint8_t
*
)
bdata
(
itti_msg
.
nas
);
if
(
buf_tmp
!=
nullptr
)
memcpy
(
nas_pdu
,
buf_tmp
,
blength
(
itti_msg
.
nas
));
nas_pdu
[
blength
(
itti_msg
.
nas
)]
=
'\0'
;
item
.
pduSessionNAS_PDU
=
nas_pdu
;
item
.
sizeofpduSessionNAS_PDU
=
blength
(
itti_msg
.
nas
);
...
...
@@ -1136,7 +1138,8 @@ void amf_n2::handle_itti_message(
item
.
s_nssai
.
sst
=
itti_msg
.
s_NSSAI
.
getSst
();
uint8_t
*
nas_pdu
=
(
uint8_t
*
)
calloc
(
1
,
blength
(
itti_msg
.
nas
)
+
1
);
memcpy
(
nas_pdu
,
(
uint8_t
*
)
bdata
(
itti_msg
.
nas
),
blength
(
itti_msg
.
nas
));
uint8_t
*
buf_tmp
=
(
uint8_t
*
)
bdata
(
itti_msg
.
nas
);
if
(
buf_tmp
!=
nullptr
)
memcpy
(
nas_pdu
,
buf_tmp
,
blength
(
itti_msg
.
nas
));
nas_pdu
[
blength
(
itti_msg
.
nas
)]
=
'\0'
;
item
.
pduSessionNAS_PDU
=
nas_pdu
;
item
.
sizeofpduSessionNAS_PDU
=
blength
(
itti_msg
.
nas
);
...
...
@@ -1201,7 +1204,8 @@ void amf_n2::handle_itti_message(
release_cmd_msg
->
setAmfUeNgapId
(
itti_msg
.
amf_ue_ngap_id
);
release_cmd_msg
->
setRanUeNgapId
(
itti_msg
.
ran_ue_ngap_id
);
uint8_t
*
nas_pdu
=
(
uint8_t
*
)
calloc
(
1
,
blength
(
itti_msg
.
nas
)
+
1
);
memcpy
(
nas_pdu
,
(
uint8_t
*
)
bdata
(
itti_msg
.
nas
),
blength
(
itti_msg
.
nas
));
uint8_t
*
buf_tmp
=
(
uint8_t
*
)
bdata
(
itti_msg
.
nas
);
if
(
buf_tmp
!=
nullptr
)
memcpy
(
nas_pdu
,
buf_tmp
,
blength
(
itti_msg
.
nas
));
nas_pdu
[
blength
(
itti_msg
.
nas
)]
=
'\0'
;
release_cmd_msg
->
setNasPdu
(
nas_pdu
,
blength
(
itti_msg
.
nas
));
...
...
src/nas/ies/Payload_Container.cpp
View file @
691cab6f
...
...
@@ -104,7 +104,8 @@ int Payload_Container::encode2buffer(uint8_t* buf, int len) {
encoded_size
++
;
*
(
buf
+
encoded_size
)
=
(
blength
(
content
)
&
0x00ff
);
encoded_size
++
;
memcpy
(
buf
+
encoded_size
,
(
uint8_t
*
)
bdata
(
content
),
blength
(
content
));
uint8_t
*
buf_tmp
=
(
uint8_t
*
)
bdata
(
content
);
if
(
buf_tmp
!=
nullptr
)
memcpy
(
buf
+
encoded_size
,
buf_tmp
,
blength
(
content
));
encoded_size
+=
blength
(
content
);
#if 0
...
...
src/ngap/ngapMsgs/RerouteNASRequest.cpp
View file @
691cab6f
...
...
@@ -326,6 +326,7 @@ void RerouteNASRequest::setNgapMessage(OCTET_STRING_t& message) {
//------------------------------------------------------------------------------
bool
RerouteNASRequest
::
getNgapMessage
(
OCTET_STRING_t
&
message
)
const
{
message
=
ngapMessage
;
return
true
;
}
//------------------------------------------------------------------------------
void
RerouteNASRequest
::
setAMFSetID
(
const
std
::
string
&
amf_set_id
)
{
...
...
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