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
dc294603
Commit
dc294603
authored
Jul 29, 2022
by
yangjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug: handover error -> The count does not match
parent
044ed83d
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
95 additions
and
106 deletions
+95
-106
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+8
-5
src/amf-app/amf_n11.cpp
src/amf-app/amf_n11.cpp
+4
-1
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+51
-66
src/itti/msgs/itti_msg_n11.hpp
src/itti/msgs/itti_msg_n11.hpp
+1
-0
src/ngap/ngapIEs/COUNTValueForPDCP_SN18.cpp
src/ngap/ngapIEs/COUNTValueForPDCP_SN18.cpp
+4
-4
src/ngap/ngapIEs/PDUSessionResourceHandoverCommandTransfer.cpp
...gap/ngapIEs/PDUSessionResourceHandoverCommandTransfer.cpp
+9
-9
src/ngap/ngapIEs/PDUSessionResourceHandoverRequestAckTransfer.cpp
.../ngapIEs/PDUSessionResourceHandoverRequestAckTransfer.cpp
+4
-7
src/ngap/ngapIEs/QosFlowToBeForwardedList.cpp
src/ngap/ngapIEs/QosFlowToBeForwardedList.cpp
+2
-2
src/ngap/ngapIEs/dRBStatusDL.cpp
src/ngap/ngapIEs/dRBStatusDL.cpp
+2
-2
src/ngap/ngapIEs/dRBStatusUL.cpp
src/ngap/ngapIEs/dRBStatusUL.cpp
+2
-2
src/ngap/ngapIEs/dRBsSubjectToStatusTransferItem.cpp
src/ngap/ngapIEs/dRBsSubjectToStatusTransferItem.cpp
+4
-4
src/ngap/ngapIEs/dRBsSubjectToStatusTransferList.cpp
src/ngap/ngapIEs/dRBsSubjectToStatusTransferList.cpp
+2
-2
src/ngap/ngapMsgs/UplinkRANStatusTransfer.cpp
src/ngap/ngapMsgs/UplinkRANStatusTransfer.cpp
+2
-2
No files found.
src/amf-app/amf_n1.cpp
View file @
dc294603
...
...
@@ -666,6 +666,7 @@ void amf_n1::service_request_handle(bool isNasSig,
}
set_amf_ue_ngap_id_2_nas_context
(
amf_ue_ngap_id
,
nc
);
nc
.
get
()
->
ran_ue_ngap_id
=
ran_ue_ngap_id
;
nas_secu_ctx
*
secu
=
nc
.
get
()
->
security_ctx
;
ServiceRequest
*
serReq
=
new
ServiceRequest
();
serReq
->
decodefrombuffer
(
nullptr
,
(
uint8_t
*
)
bdata
(
nas
),
blength
(
nas
));
...
...
@@ -2194,7 +2195,6 @@ int amf_n1::security_select_algorithms(uint8_t nea, uint8_t nia,
}
return
0
;
}
//------------------------------------------------------------------------------
void
amf_n1
::
security_mode_complete_handle
(
uint32_t
ran_ue_ngap_id
,
long
amf_ue_ngap_id
,
...
...
@@ -2353,9 +2353,9 @@ void amf_n1::security_mode_complete_handle(uint32_t ran_ue_ngap_id,
protectedNas
);
uint8_t
*
kamf
=
nc
.
get
()
->
kamf
[
secu
->
vector_pointer
];
uint8_t
kgnb
[
32
];
uint32_t
ulcount
=
secu
->
ul_count
.
seq_num
|
(
secu
->
ul_count
.
overflow
<<
8
);
//
uint32_t ulcount = secu->ul_count.seq_num | (secu->ul_count.overflow << 8);
Authentication_5gaka
::
derive_kgnb
(
0
,
0x01
,
kamf
,
kgnb
);
ncc
=
1
;
//
ncc = 1;
print_buffer
(
"amf_n1"
,
"kamf"
,
kamf
,
32
);
// Authentication_5gaka::derive_kgnb(ulcount, 0x01, kamf, kgnb);
bstring
kgnb_bs
=
blk2bstr
(
kgnb
,
32
);
...
...
@@ -3055,8 +3055,11 @@ void amf_n1::run_mobility_registration_update_procedure(
itti_msg
->
kgnb
=
kgnb_bs
;
itti_msg
->
nas
=
protectedNas
;
itti_msg
->
is_sr
=
true
;
// service request indicator
itti_msg
->
pdu_session_id
=
psc
.
get
()
->
pdu_session_id
;
itti_msg
->
n2sm
=
psc
.
get
()
->
n2sm
;
if
(
psc
.
get
()
!=
nullptr
)
{
itti_msg
->
pdu_session_id
=
psc
.
get
()
->
pdu_session_id
;
itti_msg
->
n2sm
=
psc
.
get
()
->
n2sm
;
}
std
::
shared_ptr
<
itti_initial_context_setup_request
>
i
=
std
::
shared_ptr
<
itti_initial_context_setup_request
>
(
itti_msg
);
int
ret
=
itti_inst
->
send_msg
(
i
);
...
...
src/amf-app/amf_n11.cpp
View file @
dc294603
...
...
@@ -199,9 +199,12 @@ void amf_n11::handle_itti_message(
Logger
::
amf_n11
().
debug
(
"SMF URI: %s"
,
remote_uri
.
c_str
());
nlohmann
::
json
pdu_session_update_request
=
{};
// if (itti_msg.is_n2sm_set){
pdu_session_update_request
[
"n2SmInfoType"
]
=
itti_msg
.
n2sm_info_type
;
pdu_session_update_request
[
"n2SmInfo"
][
"contentId"
]
=
"n2msg"
;
if
(
!
itti_msg
.
ho_state
.
compare
(
"COMPLETED"
))
{
pdu_session_update_request
[
"hoState"
]
=
itti_msg
.
ho_state
;
}
std
::
string
json_part
=
pdu_session_update_request
.
dump
();
std
::
string
n2SmMsg
;
octet_stream_2_hex_stream
(
...
...
src/amf-app/amf_n2.cpp
View file @
dc294603
This diff is collapsed.
Click to expand it.
src/itti/msgs/itti_msg_n11.hpp
View file @
dc294603
...
...
@@ -70,6 +70,7 @@ class itti_nsmf_pdusession_update_sm_context : public itti_msg_n11 {
}
public:
std
::
string
ho_state
;
std
::
string
supi
;
uint8_t
pdu_session_id
;
bstring
n2sm
;
...
...
src/ngap/ngapIEs/COUNTValueForPDCP_SN18.cpp
View file @
dc294603
...
...
@@ -21,16 +21,16 @@ bool COUNTValueForPDCP_SN18::encodedCOUNTValueForPDCP_SN18(
Ngap_COUNTValueForPDCP_SN18_t
*
countvalue
)
{
countvalue
->
pDCP_SN18
=
pdcp
;
countvalue
->
hFN_PDCP_SN18
=
hfn_pdcp
;
cout
<<
"the encode pdcp_sn18 is"
<<
countvalue
->
pDCP_SN18
<<
endl
;
cout
<<
"the encode hfn_pdcp_sn18 is"
<<
countvalue
->
hFN_PDCP_SN18
<<
endl
;
//
cout << "the encode pdcp_sn18 is" << countvalue->pDCP_SN18 << endl;
//
cout << "the encode hfn_pdcp_sn18 is" << countvalue->hFN_PDCP_SN18 << endl;
return
true
;
}
bool
COUNTValueForPDCP_SN18
::
decodedCOUNTValueForPDCP_SN18
(
Ngap_COUNTValueForPDCP_SN18_t
&
countValue
)
{
pdcp
=
countValue
.
pDCP_SN18
;
hfn_pdcp
=
countValue
.
hFN_PDCP_SN18
;
cout
<<
"the decode pdcp_sn18 is"
<<
countValue
.
pDCP_SN18
<<
endl
;
cout
<<
"the decode hfn_pdcp_sn18 is"
<<
countValue
.
hFN_PDCP_SN18
<<
endl
;
//
cout << "the decode pdcp_sn18 is" << countValue.pDCP_SN18 << endl;
//
cout << "the decode hfn_pdcp_sn18 is" << countValue.hFN_PDCP_SN18 << endl;
return
true
;
}
}
// namespace ngap
src/ngap/ngapIEs/PDUSessionResourceHandoverCommandTransfer.cpp
View file @
dc294603
...
...
@@ -32,17 +32,17 @@ void PDUSessionResourceHandoverCommandTransfer::setQosFlowToBeForwardedList(
qosFlowToBeForwardedList
->
setQosFlowToBeForwardedItem
(
m_item
,
list
.
size
());
int
ret
=
qosFlowToBeForwardedList
->
encodeQosFlowToBeForwardedList
(
handovercommandtransferIE
->
qosFlowToBeForwardedList
);
cout
<<
"QFI in list "
<<
handovercommandtransferIE
->
qosFlowToBeForwardedList
->
list
.
count
<<
endl
;
//
cout << "QFI in list "
//
<< handovercommandtransferIE->qosFlowToBeForwardedList->list.count
//
<< endl;
if
(
handovercommandtransferIE
->
qosFlowToBeForwardedList
->
list
.
array
)
{
cout
<<
"array OK"
<<
endl
;
//
cout << "array OK" << endl;
if
(
handovercommandtransferIE
->
qosFlowToBeForwardedList
->
list
.
array
[
0
])
{
cout
<<
"QFI in list "
<<
handovercommandtransferIE
->
qosFlowToBeForwardedList
->
list
.
array
[
0
]
->
qosFlowIdentifier
<<
endl
;
//
cout << "QFI in list "
//
<< handovercommandtransferIE->qosFlowToBeForwardedList->list
//
.array[0]
//
->qosFlowIdentifier
//
<< endl;
}
else
{
cout
<<
"error1"
<<
endl
;
}
...
...
src/ngap/ngapIEs/PDUSessionResourceHandoverRequestAckTransfer.cpp
View file @
dc294603
...
...
@@ -61,11 +61,11 @@ bool PDUSessionResourceHandoverRequestAckTransfer::
cout
<<
"More data expected, call again"
<<
endl
;
return
false
;
}
else
{
cout
<<
"Failure to decode handoverRequestAcknowledegTransfer data"
<<
endl
;
cout
<<
"
Warn:
Failure to decode handoverRequestAcknowledegTransfer data"
<<
endl
;
// return false;
}
cout
<<
"rc.consumed to decode = "
<<
rc
.
consumed
<<
endl
;
cout
<<
endl
;
//
cout << "rc.consumed to decode = " << rc.consumed << endl;
//
cout << endl;
dLForwardingUP_TNLInformation
=
new
UpTransportLayerInformation
();
if
(
!
dLForwardingUP_TNLInformation
->
decodefromUpTransportLayerInformation
(
*
handoverRequestAcknowledegTransferIEs
...
...
@@ -102,10 +102,7 @@ bool PDUSessionResourceHandoverRequestAckTransfer::getqosFlowSetupResponseList(
if
(
!
QosFlowSetupResponseList
)
return
false
;
QosFlowItemWithDataForWarding
*
m_qosflowitemwithdataforwarding
;
int
num
=
0
;
if
(
QosFlowSetupResponseList
->
getQosFlowListWithDataForwarding
(
m_qosflowitemwithdataforwarding
,
num
))
{
cout
<<
"successful decode QosFlowList"
<<
endl
;
}
QosFlowSetupResponseList
->
getQosFlowListWithDataForwarding
(
m_qosflowitemwithdataforwarding
,
num
);
for
(
int
i
=
0
;
i
<
num
;
i
++
)
{
QosFlowLItemWithDataForwarding_t
response
;
m_qosflowitemwithdataforwarding
[
i
].
getQosFlowItemWithDataForWarding
(
...
...
src/ngap/ngapIEs/QosFlowToBeForwardedList.cpp
View file @
dc294603
...
...
@@ -17,7 +17,7 @@ bool QosFlowToBeForwardedList::encodeQosFlowToBeForwardedList(
m_ngap_qosflowtobeforwardedlist
=
(
Ngap_QosFlowToBeForwardedList_t
*
)
calloc
(
1
,
sizeof
(
Ngap_QosFlowToBeForwardedList_t
));
for
(
int
i
=
0
;
i
<
numofqosflowtobeforwardeditem
;
i
++
)
{
cout
<<
"encoding list..."
<<
endl
;
//
cout << "encoding list..." << endl;
Ngap_QosFlowToBeForwardedItem_t
*
response
=
(
Ngap_QosFlowToBeForwardedItem_t
*
)
calloc
(
1
,
sizeof
(
Ngap_QosFlowToBeForwardedItem_t
));
...
...
@@ -26,7 +26,7 @@ bool QosFlowToBeForwardedList::encodeQosFlowToBeForwardedList(
cout
<<
"encode QosFlowTowardedItem error"
<<
endl
;
return
false
;
}
cout
<<
"QFI is "
<<
response
->
qosFlowIdentifier
<<
endl
;
//
cout << "QFI is " << response->qosFlowIdentifier << endl;
if
(
ASN_SEQUENCE_ADD
(
&
m_ngap_qosflowtobeforwardedlist
->
list
,
response
)
!=
0
)
{
cout
<<
"encode QosFlowTowardedList error"
<<
endl
;
...
...
src/ngap/ngapIEs/dRBStatusDL.cpp
View file @
dc294603
...
...
@@ -48,7 +48,7 @@ bool dRBStatusDL::encodedRBStatusDL(Ngap_DRBStatusDL_t* dL) {
cout
<<
"encodedRBStatusDL error"
<<
endl
;
return
false
;
}
cout
<<
"encodedRBStatusDL successfully"
<<
endl
;
//
cout << "encodedRBStatusDL successfully" << endl;
return
true
;
}
bool
dRBStatusDL
::
decodedRBStatusDL
(
Ngap_DRBStatusDL_t
*
dL
)
{
...
...
@@ -57,7 +57,7 @@ bool dRBStatusDL::decodedRBStatusDL(Ngap_DRBStatusDL_t* dL) {
cout
<<
"decodedRBStatusDL error"
<<
endl
;
return
false
;
}
cout
<<
"decodedRBStatusDL successfully"
<<
endl
;
//
cout << "decodedRBStatusDL successfully" << endl;
return
true
;
}
}
// namespace ngap
src/ngap/ngapIEs/dRBStatusUL.cpp
View file @
dc294603
...
...
@@ -49,7 +49,7 @@ bool dRBStatusUL::encodedRBStatusUL(Ngap_DRBStatusUL_t* uL) {
cout
<<
"encodeddRBStatusUL18 error"
<<
endl
;
return
false
;
}
cout
<<
"encodedRBStatusUL successfully"
<<
endl
;
//
cout << "encodedRBStatusUL successfully" << endl;
return
true
;
}
bool
dRBStatusUL
::
decodedRBStatusUL
(
Ngap_DRBStatusUL_t
*
uL
)
{
...
...
@@ -58,7 +58,7 @@ bool dRBStatusUL::decodedRBStatusUL(Ngap_DRBStatusUL_t* uL) {
cout
<<
"decodeddRBStatusUL18 error"
<<
endl
;
return
false
;
}
cout
<<
"decodedRBStatusUL successfully"
<<
endl
;
//
cout << "decodedRBStatusUL successfully" << endl;
return
true
;
}
}
// namespace ngap
src/ngap/ngapIEs/dRBsSubjectToStatusTransferItem.cpp
View file @
dc294603
...
...
@@ -27,7 +27,7 @@ bool dRBSubjectItem::decodefromdRBSubjectItem(
Ngap_DRBsSubjectToStatusTransferItem_t
*
dRB_item
)
{
if
(
dRB_item
->
dRB_ID
)
{
drb_id
=
&
dRB_item
->
dRB_ID
;
cout
<<
"the decode drb_id is"
<<
*
drb_id
<<
endl
;
//
cout << "the decode drb_id is" << *drb_id << endl;
}
drb_ul
=
new
dRBStatusUL
();
if
(
!
drb_ul
->
decodedRBStatusUL
(
&
dRB_item
->
dRBStatusUL
))
{
...
...
@@ -39,14 +39,14 @@ bool dRBSubjectItem::decodefromdRBSubjectItem(
cout
<<
"decode from dRBSubjectItem dRBStatusDL error"
<<
endl
;
return
false
;
}
cout
<<
"decode from dRBSubjectItem successfully"
<<
endl
;
//
cout << "decode from dRBSubjectItem successfully" << endl;
return
true
;
}
bool
dRBSubjectItem
::
encodedRBSubjectItem
(
Ngap_DRBsSubjectToStatusTransferItem_t
*
dRB_item
)
{
if
(
drb_id
)
{
dRB_item
->
dRB_ID
=
*
drb_id
;
cout
<<
"the encode drb_id is"
<<
*
drb_id
<<
endl
;
//
cout << "the encode drb_id is" << *drb_id << endl;
}
if
(
!
drb_ul
->
encodedRBStatusUL
(
&
dRB_item
->
dRBStatusUL
))
{
cout
<<
"encode from dRBSubjectItem dRBStatusUL error"
<<
endl
;
...
...
@@ -56,7 +56,7 @@ bool dRBSubjectItem::encodedRBSubjectItem(
cout
<<
"encode from dRBSubjectItem dRBStatusDL error"
<<
endl
;
return
false
;
}
cout
<<
"encode from dRBSubjectItem successfully"
<<
endl
;
//
cout << "encode from dRBSubjectItem successfully" << endl;
return
true
;
}
}
// namespace ngap
\ No newline at end of file
src/ngap/ngapIEs/dRBsSubjectToStatusTransferList.cpp
View file @
dc294603
...
...
@@ -34,7 +34,7 @@ bool dRBSubjectList::encodefromdRBSubjectlist(
return
false
;
}
}
cout
<<
"encodefromdRBSubjectlist successfully"
<<
endl
;
//
cout << "encodefromdRBSubjectlist successfully" << endl;
return
true
;
}
bool
dRBSubjectList
::
decodefromdRBSubjectlist
(
...
...
@@ -48,7 +48,7 @@ bool dRBSubjectList::decodefromdRBSubjectlist(
return
false
;
}
}
cout
<<
"decodefromdRBSubjectlist successfully"
<<
endl
;
//
cout << "decodefromdRBSubjectlist successfully" << endl;
return
true
;
}
}
// namespace ngap
\ No newline at end of file
src/ngap/ngapMsgs/UplinkRANStatusTransfer.cpp
View file @
dc294603
...
...
@@ -128,8 +128,8 @@ bool UplinkRANStatusTransfer::defromPDU(Ngap_NGAP_PDU_t* ngap_msg_pdu) {
<<
endl
;
return
false
;
}
cout
<<
"can get the buffer of RANStatusTransfer_TransparentContainer"
<<
endl
;
//
cout << "can get the buffer of RANStatusTransfer_TransparentContainer"
//
<< endl;
}
else
{
cout
<<
"cann't get the buffer of "
"RANStatusTransfer_TransparentContainer"
...
...
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