Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
UERANSIM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
Libraries
UERANSIM
Commits
74452fe7
Commit
74452fe7
authored
Apr 17, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Uplink NAS signalling pending handling
parent
492086e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
src/ue/nas/mm/transport.cpp
src/ue/nas/mm/transport.cpp
+18
-4
No files found.
src/ue/nas/mm/transport.cpp
View file @
74452fe7
...
...
@@ -10,18 +10,32 @@
#include <asn/rrc/ASN_RRC_EstablishmentCause.h>
#include <nas/utils.hpp>
#include <ue/nas/enc.hpp>
#include <ue/rrc/task.hpp>
#include <ue/nas/sm/sm.hpp>
#include <ue/rrc/task.hpp>
namespace
nr
::
ue
{
static
bool
IsInitialNasMessage
(
const
nas
::
PlainMmMessage
&
msg
)
{
return
msg
.
messageType
==
nas
::
EMessageType
::
REGISTRATION_REQUEST
||
msg
.
messageType
==
nas
::
EMessageType
::
DEREGISTRATION_REQUEST_UE_ORIGINATING
||
msg
.
messageType
==
nas
::
EMessageType
::
SERVICE_REQUEST
;
}
void
NasMm
::
sendNasMessage
(
const
nas
::
PlainMmMessage
&
msg
)
{
if
(
m_cmState
==
ECmState
::
CM_IDLE
&&
!
IsInitialNasMessage
(
msg
))
{
m_logger
->
warn
(
"NAS Transport aborted, Service Request is needed for uplink signalling"
);
if
(
m_mmState
!=
EMmState
::
MM_SERVICE_REQUEST_INITIATED
)
sendServiceRequest
(
EServiceReqCause
::
IDLE_UPLINK_SIGNAL_PENDING
);
return
;
}
OctetString
pdu
{};
if
(
m_usim
->
m_currentNsCtx
&&
(
m_usim
->
m_currentNsCtx
->
integrity
!=
nas
::
ETypeOfIntegrityProtectionAlgorithm
::
IA0
||
m_usim
->
m_currentNsCtx
->
ciphering
!=
nas
::
ETypeOfCipheringAlgorithm
::
EA0
))
if
(
m_usim
->
m_currentNsCtx
&&
(
m_usim
->
m_currentNsCtx
->
integrity
!=
nas
::
ETypeOfIntegrityProtectionAlgorithm
::
IA0
||
m_usim
->
m_currentNsCtx
->
ciphering
!=
nas
::
ETypeOfCipheringAlgorithm
::
EA0
))
{
auto
secured
=
nas_enc
::
Encrypt
(
*
m_usim
->
m_currentNsCtx
,
msg
);
nas
::
EncodeNasMessage
(
*
secured
,
pdu
);
...
...
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