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
d8e1dff6
Commit
d8e1dff6
authored
Feb 27, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mobile storage refactor
parent
4f597b8f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
35 deletions
+32
-35
src/ue/mm/auth.cpp
src/ue/mm/auth.cpp
+6
-1
src/ue/mm/dereg.cpp
src/ue/mm/dereg.cpp
+22
-4
src/ue/mm/register.cpp
src/ue/mm/register.cpp
+3
-3
src/ue/nas/storage.hpp
src/ue/nas/storage.hpp
+1
-27
No files found.
src/ue/mm/auth.cpp
View file @
d8e1dff6
...
...
@@ -353,7 +353,12 @@ void NasMm::receiveAuthenticationReject(const nas::AuthenticationReject &msg)
switchUState
(
E5UState
::
U3_ROAMING_NOT_ALLOWED
);
// Delete the stored 5G-GUTI, TAI list, last visited registered TAI and ngKSI. The USIM shall be considered invalid
// until switching off the UE or the UICC containing the USIM is removed
m_storage
.
invalidateSim__
();
m_storage
.
m_storedGuti
=
{};
m_storage
.
m_lastVisitedRegisteredTai
=
{};
m_storage
.
m_taiList
=
{};
m_storage
.
m_currentNsCtx
=
{};
m_storage
.
m_nonCurrentNsCtx
=
{};
m_storage
.
invalidateSim
();
// The UE shall abort any 5GMM signalling procedure, stop any of the timers T3510, T3516, T3517, T3519 or T3521 (if
// they were running) ..
m_timers
->
t3510
.
stop
();
...
...
src/ue/mm/dereg.cpp
View file @
d8e1dff6
...
...
@@ -168,7 +168,12 @@ void NasMm::receiveDeregistrationRequest(const nas::DeRegistrationRequestUeTermi
case
nas
:
:
EMmCause
::
ILLEGAL_ME
:
case
nas
:
:
EMmCause
::
FIVEG_SERVICES_NOT_ALLOWED
:
{
switchUState
(
E5UState
::
U3_ROAMING_NOT_ALLOWED
);
m_storage
.
invalidateSim__
();
m_storage
.
m_storedGuti
=
{};
m_storage
.
m_lastVisitedRegisteredTai
=
{};
m_storage
.
m_taiList
=
{};
m_storage
.
m_currentNsCtx
=
{};
m_storage
.
m_nonCurrentNsCtx
=
{};
m_storage
.
invalidateSim
();
switchMmState
(
EMmState
::
MM_DEREGISTERED
,
EMmSubState
::
MM_DEREGISTERED_NA
);
break
;
}
...
...
@@ -181,13 +186,21 @@ void NasMm::receiveDeregistrationRequest(const nas::DeRegistrationRequestUeTermi
//}
case
nas
:
:
EMmCause
::
TA_NOT_ALLOWED
:
{
switchUState
(
E5UState
::
U3_ROAMING_NOT_ALLOWED
);
m_storage
.
discardUsim
();
m_storage
.
m_storedGuti
=
{};
m_storage
.
m_lastVisitedRegisteredTai
=
{};
m_storage
.
m_taiList
=
{};
m_storage
.
m_currentNsCtx
=
{};
m_storage
.
m_nonCurrentNsCtx
=
{};
switchMmState
(
EMmState
::
MM_DEREGISTERED
,
EMmSubState
::
MM_DEREGISTERED_LIMITED_SERVICE
);
break
;
}
case
nas
:
:
EMmCause
::
N1_MODE_NOT_ALLOWED
:
{
switchUState
(
E5UState
::
U3_ROAMING_NOT_ALLOWED
);
m_storage
.
discardUsim
();
m_storage
.
m_storedGuti
=
{};
m_storage
.
m_lastVisitedRegisteredTai
=
{};
m_storage
.
m_taiList
=
{};
m_storage
.
m_currentNsCtx
=
{};
m_storage
.
m_nonCurrentNsCtx
=
{};
switchMmState
(
EMmState
::
MM_NULL
,
EMmSubState
::
MM_NULL_NA
);
break
;
}
...
...
@@ -204,7 +217,12 @@ void NasMm::receiveDeregistrationRequest(const nas::DeRegistrationRequestUeTermi
nas
::
utils
::
EnumToString
(
msg
.
mmCause
->
value
));
switchUState
(
E5UState
::
U3_ROAMING_NOT_ALLOWED
);
m_storage
.
invalidateSim__
();
m_storage
.
m_storedGuti
=
{};
m_storage
.
m_lastVisitedRegisteredTai
=
{};
m_storage
.
m_taiList
=
{};
m_storage
.
m_currentNsCtx
=
{};
m_storage
.
m_nonCurrentNsCtx
=
{};
m_storage
.
invalidateSim
();
switchMmState
(
EMmState
::
MM_DEREGISTERED
,
EMmSubState
::
MM_DEREGISTERED_NA
);
break
;
}
...
...
src/ue/mm/register.cpp
View file @
d8e1dff6
...
...
@@ -20,7 +20,7 @@ void NasMm::sendRegistration(nas::ERegistrationType regType, bool dueToDereg)
{
if
(
m_mmState
!=
EMmState
::
MM_DEREGISTERED
)
{
m_logger
->
warn
(
"Registration could be triggered. UE is not in MM-DEREGISTERED state."
);
m_logger
->
warn
(
"Registration could
not
be triggered. UE is not in MM-DEREGISTERED state."
);
return
;
}
...
...
@@ -90,7 +90,7 @@ void NasMm::sendRegistration(nas::ERegistrationType regType, bool dueToDereg)
// Assign mobile identity
request
->
mobileIdentity
=
getOrGeneratePreferredId
();
// Assign last visited registered if available
// Assign last visited registered
TAI
if available
if
(
m_storage
.
m_lastVisitedRegisteredTai
.
has_value
())
request
->
lastVisitedRegisteredTai
=
*
m_storage
.
m_lastVisitedRegisteredTai
;
...
...
@@ -301,7 +301,7 @@ void NasMm::receiveRegistrationReject(const nas::RegistrationReject &msg)
if
(
cause
==
nas
::
EMmCause
::
ILLEGAL_UE
||
cause
==
nas
::
EMmCause
::
ILLEGAL_ME
||
cause
==
nas
::
EMmCause
::
FIVEG_SERVICES_NOT_ALLOWED
)
{
m_storage
.
invalidateSim
__
();
m_storage
.
invalidateSim
();
}
if
(
cause
==
nas
::
EMmCause
::
ILLEGAL_UE
||
cause
==
nas
::
EMmCause
::
ILLEGAL_ME
||
...
...
src/ue/nas/storage.hpp
View file @
d8e1dff6
...
...
@@ -56,34 +56,8 @@ class MobileStorage
m_configuredNssai
=
initials
.
configuredNssai
;
}
void
discardLocation
()
void
invalidateSim
()
{
m_storedGuti
=
{};
m_lastVisitedRegisteredTai
=
{};
}
void
discardPlmn
()
{
m_taiList
=
{};
}
void
discardSecurity
()
{
m_currentNsCtx
=
{};
m_nonCurrentNsCtx
=
{};
}
void
discardUsim
()
{
discardLocation
();
discardPlmn
();
discardSecurity
();
}
// todo metodları kaldır geri
void
invalidateSim__
()
{
// TODO: log
m_simIsValid
=
false
;
}
...
...
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