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
c9dba7d4
Commit
c9dba7d4
authored
Feb 27, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UE registration abnormal case handling
parent
50f5a751
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
3 deletions
+63
-3
src/ue/mm/base.cpp
src/ue/mm/base.cpp
+13
-0
src/ue/mm/mm.hpp
src/ue/mm/mm.hpp
+2
-1
src/ue/mm/register.cpp
src/ue/mm/register.cpp
+48
-2
No files found.
src/ue/mm/base.cpp
View file @
c9dba7d4
...
...
@@ -246,4 +246,17 @@ void NasMm::setN1Capability(bool enabled)
// TODO
}
bool
NasMm
::
hasEmergency
()
{
// Indicates emergency services are required (even if registered for normal initial registration)
// This usually happens if it 'has' or 'need' some emergency PDU Session.
if
(
m_rmState
==
ERmState
::
RM_REGISTERED
&&
m_registeredForEmergency
)
return
true
;
// TODO: Other case which is an emergency PDU session is established, or need to be established (and wanted to be
// established soon)
return
false
;
}
}
// namespace nr::ue
src/ue/mm/mm.hpp
View file @
c9dba7d4
...
...
@@ -46,7 +46,7 @@ class NasMm
long
m_lastPlmnSearchTrigger
{};
// Registration attempt counter
int
m_regCounter
{};
// Indicates registered for emergency services
// Indicates registered for emergency services
(Only meaningful in RM-REGISTERED state)
bool
m_registeredForEmergency
{};
// Network feature support information
nas
::
IE5gsNetworkFeatureSupport
m_nwFeatureSupport
{};
...
...
@@ -91,6 +91,7 @@ class NasMm
void
onSwitchCmState
(
ECmState
oldState
,
ECmState
newState
);
void
onSwitchUState
(
E5UState
oldState
,
E5UState
newState
);
void
setN1Capability
(
bool
enabled
);
bool
hasEmergency
();
/* Transport */
void
sendMmStatus
(
nas
::
EMmCause
cause
);
...
...
src/ue/mm/register.cpp
View file @
c9dba7d4
...
...
@@ -219,7 +219,14 @@ void NasMm::receiveRegistrationAccept(const nas::RegistrationAccept &msg)
m_base
->
nasTask
->
push
(
new
NwUeNasToNas
(
NwUeNasToNas
::
ESTABLISH_INITIAL_SESSIONS
));
}
m_registeredForEmergency
=
regType
==
nas
::
ERegistrationType
::
EMERGENCY_REGISTRATION
;
if
(
regType
==
nas
::
ERegistrationType
::
INITIAL_REGISTRATION
)
m_registeredForEmergency
=
false
;
else
if
(
regType
==
nas
::
ERegistrationType
::
EMERGENCY_REGISTRATION
)
m_registeredForEmergency
=
true
;
else
{
// Other registration types will *not* alter 'is registered for emergency' state
}
m_logger
->
info
(
"%s is successful"
,
nas
::
utils
::
EnumToString
(
regType
));
}
...
...
@@ -390,7 +397,46 @@ void NasMm::receiveRegistrationReject(const nas::RegistrationReject &msg)
void
NasMm
::
handleCommonAbnormalRegFailure
(
nas
::
ERegistrationType
regType
)
{
// TODO
// Timer T3510 shall be stopped if still running
m_timers
->
t3510
.
stop
();
// If the registration procedure is neither an initial registration for emergency services nor for establishing an
// emergency PDU session with registration type not set to "emergency registration", the registration attempt
// counter shall be incremented, unless it was already set to 5.
if
(
regType
!=
nas
::
ERegistrationType
::
EMERGENCY_REGISTRATION
&&
!
hasEmergency
()
&&
m_regCounter
!=
5
)
m_regCounter
++
;
// If the registration attempt counter is less than 5:
if
(
m_regCounter
<
5
)
{
// If the initial registration request is not for emergency services, timer T3511 is started and the state is
// changed to 5GMM-DEREGISTERED.ATTEMPTING-REGISTRATION. When timer T3511 expires the registration procedure for
// initial registration shall be restarted, if still required.
if
(
!
hasEmergency
())
{
m_timers
->
t3511
.
start
();
switchMmState
(
EMmState
::
MM_DEREGISTERED
,
EMmSubState
::
MM_DEREGISTERED_ATTEMPTING_REGISTRATION
);
}
}
else
{
// The UE shall delete 5G-GUTI, TAI list, last visited TAI, list of equivalent PLMNs and ngKSI, ..
m_storage
.
m_storedGuti
=
{};
m_storage
.
m_taiList
=
{};
m_storage
.
m_lastVisitedRegisteredTai
=
{};
m_storage
.
m_equivalentPlmnList
=
{};
m_storage
.
m_currentNsCtx
=
{};
m_storage
.
m_nonCurrentNsCtx
=
{};
// .. start timer T3502 ..
m_timers
->
t3502
.
start
();
// .. and shall set the 5GS update status to 5U2 NOT UPDATED. The state is changed to
// 5GMM-DEREGISTERED.ATTEMPTING-REGISTRATION or optionally to 5GMM-DEREGISTERED.PLMN-SEARCH in order to perform
// a PLMN selection according to 3GPP TS 23.122 [5].
switchUState
(
E5UState
::
U2_NOT_UPDATED
);
switchMmState
(
EMmState
::
MM_DEREGISTERED
,
EMmSubState
::
MM_DEREGISTERED_ATTEMPTING_REGISTRATION
);
}
}
}
// namespace nr::ue
\ No newline at end of file
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