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
9caf610b
Commit
9caf610b
authored
Nov 30, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add log/fix minor issue with ngKSI
parent
8bbc18db
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
22 deletions
+28
-22
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+10
-7
src/nas/msgs/DeregistrationRequest.cpp
src/nas/msgs/DeregistrationRequest.cpp
+4
-2
src/nas/msgs/DeregistrationRequest.hpp
src/nas/msgs/DeregistrationRequest.hpp
+1
-1
src/nas/msgs/RegistrationRequest.cpp
src/nas/msgs/RegistrationRequest.cpp
+6
-5
src/nas/msgs/RegistrationRequest.hpp
src/nas/msgs/RegistrationRequest.hpp
+1
-1
src/nas/msgs/ServiceRequest.cpp
src/nas/msgs/ServiceRequest.cpp
+5
-5
src/nas/msgs/ServiceRequest.hpp
src/nas/msgs/ServiceRequest.hpp
+1
-1
No files found.
src/amf-app/amf_n1.cpp
View file @
9caf610b
...
...
@@ -1088,21 +1088,20 @@ void amf_n1::registration_request_handle(
}
// Check 5GS_Registration_type IE (Mandatory IE)
uint8_t
reg_type
;
bool
is_follow_on_req_pending
;
uint8_t
reg_type
=
0
;
bool
is_follow_on_req_pending
=
false
;
if
(
!
regReq
->
get5GSRegistrationType
(
is_follow_on_req_pending
,
reg_type
))
{
Logger
::
amf_n1
().
error
(
"Missing Mandatory IE 5GS Registration type..."
);
response_registration_reject_msg
(
_5GMM_CAUSE_INVALID_MANDATORY_INFO
,
ran_ue_ngap_id
,
amf_ue_ngap_id
);
// delete regReq;
return
;
}
nc
.
get
()
->
registration_type
=
reg_type
;
nc
.
get
()
->
follow_on_req_pending_ind
=
is_follow_on_req_pending
;
// Check ngKSI (Mandatory IE)
uint8_t
ngKSI
=
regReq
->
getngKSI
()
;
if
(
ngKSI
==
-
1
)
{
uint8_t
ngKSI
=
0
;
if
(
!
regReq
->
getngKSI
(
ngKSI
)
)
{
Logger
::
amf_n1
().
error
(
"Missing Mandatory IE ngKSI..."
);
response_registration_reject_msg
(
_5GMM_CAUSE_INVALID_MANDATORY_INFO
,
ran_ue_ngap_id
,
amf_ue_ngap_id
);
...
...
@@ -1142,7 +1141,7 @@ void amf_n1::registration_request_handle(
// Get Requested NSSAI (Optional IE), if provided
if
(
!
regReq
->
getRequestedNssai
(
nc
.
get
()
->
requestedNssai
))
{
Logger
::
amf_n1
().
warn
(
"No Optional IE RequestedNssai available"
);
Logger
::
amf_n1
().
debug
(
"No Optional IE RequestedNssai available"
);
}
for
(
auto
r
:
nc
.
get
()
->
requestedNssai
)
{
...
...
@@ -1170,7 +1169,7 @@ void amf_n1::registration_request_handle(
if
(
!
registration_request_msg_container
->
getRequestedNssai
(
nc
.
get
()
->
requestedNssai
))
{
Logger
::
amf_n1
().
warn
(
Logger
::
amf_n1
().
debug
(
"No Optional IE RequestedNssai available in NAS Container"
);
}
else
{
for
(
auto
s
:
nc
.
get
()
->
requestedNssai
)
{
...
...
@@ -1181,6 +1180,9 @@ void amf_n1::registration_request_handle(
s
.
sst
,
s
.
sd
,
s
.
mHplmnSst
,
s
.
mHplmnSd
);
}
}
}
else
{
Logger
::
amf_n1
().
debug
(
"No Optional NAS Container inside Registration Request message"
);
}
// Store NAS information into nas_context
...
...
@@ -2702,6 +2704,7 @@ void amf_n1::ul_nas_transport_handle(
}
// TODO: Only use the first one for now if there's multiple requested NSSAI
// since we don't know which slice associated with this PDU session
if
(
nc
.
get
()
->
requestedNssai
.
size
()
>
0
)
snssai
=
nc
.
get
()
->
requestedNssai
[
0
];
}
...
...
src/nas/msgs/DeregistrationRequest.cpp
View file @
9caf610b
...
...
@@ -82,12 +82,14 @@ void DeregistrationRequest::getDeregistrationType(
}
//------------------------------------------------------------------------------
void
DeregistrationRequest
::
getngKSI
(
uint8_t
&
ng_ksi
)
{
bool
DeregistrationRequest
::
getngKSI
(
uint8_t
&
ng_ksi
)
{
if
(
ie_ngKSI
)
{
ng_ksi
=
(
ie_ngKSI
->
getTypeOfSecurityContext
())
|
ie_ngKSI
->
getasKeyIdentifier
();
return
true
;
}
else
{
ng_ksi
=
0
;
// ng_ksi = 0;
return
false
;
}
}
...
...
src/nas/msgs/DeregistrationRequest.hpp
View file @
9caf610b
...
...
@@ -58,7 +58,7 @@ class DeregistrationRequest {
void
getDeregistrationType
(
uint8_t
&
dereg_type
);
void
getDeregistrationType
(
_5gs_deregistration_type_t
&
type
);
void
getngKSI
(
uint8_t
&
ng_ksi
);
bool
getngKSI
(
uint8_t
&
ng_ksi
);
void
getMobilityIdentityType
(
uint8_t
&
type
);
std
::
string
get_5g_guti
();
bool
getSuciSupiFormatImsi
(
nas
::
SUCI_imsi_t
&
imsi
);
...
...
src/nas/msgs/RegistrationRequest.cpp
View file @
9caf610b
...
...
@@ -92,13 +92,14 @@ void RegistrationRequest::setngKSI(uint8_t tsc, uint8_t key_set_id) {
}
//------------------------------------------------------------------------------
uint8_t
RegistrationRequest
::
getngKSI
(
)
{
bool
RegistrationRequest
::
getngKSI
(
uint8_t
&
ng_ksi
)
{
if
(
ie_ngKSI
)
{
return
(
(
ie_ngKSI
->
getTypeOfSecurityContext
())
|
ie_ngKSI
->
getasKeyIdentifier
())
;
ng_ksi
=
(
ie_ngKSI
->
getTypeOfSecurityContext
())
|
ie_ngKSI
->
getasKeyIdentifier
();
return
true
;
}
else
{
return
0
;
// ng_ksi = 0;
return
false
;
}
}
...
...
src/nas/msgs/RegistrationRequest.hpp
View file @
9caf610b
...
...
@@ -93,7 +93,7 @@ class RegistrationRequest {
void
setEPS_Bearer_Context_Status
(
uint16_t
value
);
bool
get5GSRegistrationType
(
bool
&
is_for
,
uint8_t
&
reg_type
/*3bits*/
);
uint8_t
getngKSI
(
);
bool
getngKSI
(
uint8_t
&
ng_ksi
);
uint8_t
getMobilityIdentityType
();
std
::
string
get_5g_guti
();
//"error" for missing IE GUTI
bool
getSuciSupiFormatImsi
(
nas
::
SUCI_imsi_t
&
imsi
);
...
...
src/nas/msgs/ServiceRequest.cpp
View file @
9caf610b
...
...
@@ -246,13 +246,13 @@ int ServiceRequest::decodefrombuffer(
}
//------------------------------------------------------------------------------
uint8_t
ServiceRequest
::
getngKSI
(
)
{
bool
ServiceRequest
::
getngKSI
(
uint8_t
&
ng_ksi
)
{
if
(
ie_ngKSI
)
{
uint8_t
a
=
0
;
a
=
(
ie_ngKSI
->
getTypeOfSecurityContext
())
|
ie_ngKSI
->
getasKeyIdentifier
();
return
a
;
ng_ksi
=
(
ie_ngKSI
->
getTypeOfSecurityContext
())
|
ie_ngKSI
->
getasKeyIdentifier
();
return
true
;
}
else
{
return
0
;
return
false
;
}
}
...
...
src/nas/msgs/ServiceRequest.hpp
View file @
9caf610b
...
...
@@ -56,7 +56,7 @@ class ServiceRequest {
public:
int
decodefrombuffer
(
NasMmPlainHeader
*
header
,
uint8_t
*
buf
,
int
len
);
uint8_t
getngKSI
(
);
bool
getngKSI
(
uint8_t
&
ng_ksi
);
uint8_t
getServiceType
();
bool
get5G_S_TMSI
(
uint16_t
&
amfSetId
,
uint8_t
&
amfPointer
,
string
&
tmsi
);
uint16_t
getUplinkDataStatus
();
...
...
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