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
637e4a58
Commit
637e4a58
authored
May 22, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
L3 RRC/NAS developments
parent
84906d4c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
12 deletions
+40
-12
src/ue/nas/mm/base.cpp
src/ue/nas/mm/base.cpp
+25
-10
src/ue/nas/mm/mm.hpp
src/ue/nas/mm/mm.hpp
+1
-0
src/ue/nas/mm/timer.cpp
src/ue/nas/mm/timer.cpp
+14
-2
No files found.
src/ue/nas/mm/base.cpp
View file @
637e4a58
...
...
@@ -321,9 +321,9 @@ void NasMm::switchUState(E5UState state)
void
NasMm
::
onSwitchMmState
(
EMmState
oldState
,
EMmState
newState
,
EMmSubState
oldSubState
,
EMmSubState
newSubSate
)
{
// The UE shall mark the 5G NAS security context on the USIM or in the non-volatile memory as invalid when the UE
//
"
The UE shall mark the 5G NAS security context on the USIM or in the non-volatile memory as invalid when the UE
// initiates an initial registration procedure as described in subclause 5.5.1.2 or when the UE leaves state
// 5GMM-DEREGISTERED for any other state except 5GMM-NULL.
// 5GMM-DEREGISTERED for any other state except 5GMM-NULL.
"
if
(
oldState
==
EMmState
::
MM_DEREGISTERED
&&
newState
!=
EMmState
::
MM_DEREGISTERED
&&
newState
!=
EMmState
::
MM_NULL
)
{
if
(
m_usim
->
m_currentNsCtx
||
m_usim
->
m_nonCurrentNsCtx
)
...
...
@@ -335,8 +335,8 @@ void NasMm::onSwitchMmState(EMmState oldState, EMmState newState, EMmSubState ol
}
}
// If the UE enters the 5GMM state 5GMM-DEREGISTERED or 5GMM-NULL,
// The RAND and RES* values stored in the ME shall be deleted and timer T3516, if running, shall be stopped
//
"
If the UE enters the 5GMM state 5GMM-DEREGISTERED or 5GMM-NULL,
// The RAND and RES* values stored in the ME shall be deleted and timer T3516, if running, shall be stopped
"
if
(
newState
==
EMmState
::
MM_DEREGISTERED
||
newState
==
EMmState
::
MM_NULL
)
{
m_usim
->
m_rand
=
{};
...
...
@@ -352,6 +352,10 @@ void NasMm::onSwitchMmState(EMmState oldState, EMmState newState, EMmSubState ol
{
localReleaseConnection
();
}
// "Timer T3512 is stopped when the UE enters ... the 5GMM-DEREGISTERED state over 3GPP access"
if
(
newState
==
EMmState
::
MM_DEREGISTERED
)
m_timers
->
t3512
.
stop
();
}
void
NasMm
::
onSwitchRmState
(
ERmState
oldState
,
ERmState
newState
)
...
...
@@ -387,23 +391,34 @@ void NasMm::onSwitchCmState(ECmState oldState, ECmState newState)
// 5.5.2.2.6 Abnormal cases in the UE (in de-registration)
else
if
(
m_mmState
==
EMmState
::
MM_DEREGISTERED_INITIATED
)
{
// The de-registration procedure shall be aborted and the UE proceeds as follows:
//
"
The de-registration procedure shall be aborted and the UE proceeds as follows:
// if the de-registration procedure was performed due to disabling of 5GS services, the UE shall enter the
// 5GMM-NULL state;
// 5GMM-NULL state;
"
if
(
m_lastDeregCause
==
EDeregCause
::
DISABLE_5G
)
switchMmState
(
EMmSubState
::
MM_NULL_PS
);
// if the de-registration type "normal de-registration" was requested for reasons other than disabling of
// 5GS services, the UE shall enter the 5GMM-DEREGISTERED state.
//
"
if the de-registration type "normal de-registration" was requested for reasons other than disabling of
// 5GS services, the UE shall enter the 5GMM-DEREGISTERED state.
"
else
if
(
m_lastDeregistrationRequest
->
deRegistrationType
.
switchOff
==
nas
::
ESwitchOff
::
NORMAL_DE_REGISTRATION
)
switchMmState
(
EMmSubState
::
MM_DEREGISTERED_PS
);
}
//
If the UE enters the 5GMM-IDLE, the RAND and RES* values stored
//
in the ME shall be deleted and timer T3516, if running, shall be stopped
//
"If the UE enters the 5GMM-IDLE, the RAND and RES* values stored in the ME shall be deleted and timer T3516,
//
if running, shall be stopped"
m_usim
->
m_rand
=
{};
m_usim
->
m_resStar
=
{};
m_timers
->
t3516
.
stop
();
// "Timer T3512 is reset and started with its initial value, when the UE changes from 5GMM-CONNECTED over 3GPP
// access to 5GMM-IDLE mode over 3GPP access"
m_timers
->
t3512
.
start
();
}
if
(
oldState
==
ECmState
::
CM_IDLE
&&
newState
==
ECmState
::
CM_CONNECTED
)
{
// "Timer T3512 is stopped when the UE enters 5GMM-CONNECTED mode over 3GPP access or the 5GMM-DEREGISTERED
// state over 3GPP access"
m_timers
->
t3512
.
stop
();
}
}
...
...
src/ue/nas/mm/mm.hpp
View file @
637e4a58
...
...
@@ -138,6 +138,7 @@ class NasMm
private:
/* De-registration */
void
receiveDeregistrationAccept
(
const
nas
::
DeRegistrationAcceptUeOriginating
&
msg
);
void
receiveDeregistrationRequest
(
const
nas
::
DeRegistrationRequestUeTerminated
&
msg
);
void
performLocalDeregistration
();
private:
/* Configuration */
void
receiveConfigurationUpdate
(
const
nas
::
ConfigurationUpdateCommand
&
msg
);
...
...
src/ue/nas/mm/timer.cpp
View file @
637e4a58
...
...
@@ -78,10 +78,22 @@ void NasMm::onTimerExpire(UeTimer &timer)
break
;
}
case
3512
:
{
if
(
m_mmState
==
EMmState
::
MM_REGISTERED
&&
m_cmState
==
ECmState
::
CM_CONNECTED
)
if
(
m_mmState
==
EMmState
::
MM_REGISTERED
)
{
logExpired
();
sendMobilityRegistration
(
ERegUpdateCause
::
T3512_EXPIRY
);
if
(
m_registeredForEmergency
)
performLocalDeregistration
();
else
{
if
(
m_mmSubState
==
EMmSubState
::
MM_REGISTERED_NORMAL_SERVICE
)
sendMobilityRegistration
(
ERegUpdateCause
::
T3512_EXPIRY
);
else
{
// TODO: "the periodic registration update procedure is delayed until the UE returns to
// 5GMM-REGISTERED.NORMAL-SERVICE over 3GPP access." See 5.3.7
}
}
}
break
;
}
...
...
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