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
3cb309f6
Commit
3cb309f6
authored
Feb 28, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Registration updating abnormal case handling
parent
28510561
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
369 additions
and
31 deletions
+369
-31
src/ue/mm/base.cpp
src/ue/mm/base.cpp
+16
-6
src/ue/mm/mm.hpp
src/ue/mm/mm.hpp
+2
-1
src/ue/mm/register.cpp
src/ue/mm/register.cpp
+227
-10
src/ue/mm/timer.cpp
src/ue/mm/timer.cpp
+27
-12
src/ue/types.cpp
src/ue/types.cpp
+47
-0
src/ue/types.hpp
src/ue/types.hpp
+50
-2
No files found.
src/ue/mm/base.cpp
View file @
3cb309f6
...
@@ -208,15 +208,25 @@ void NasMm::onSwitchCmState(ECmState oldState, ECmState newState)
...
@@ -208,15 +208,25 @@ void NasMm::onSwitchCmState(ECmState oldState, ECmState newState)
// 5.5.1.2.7 Abnormal cases in the UE (in registration)
// 5.5.1.2.7 Abnormal cases in the UE (in registration)
if
(
m_mmState
==
EMmState
::
MM_REGISTERED_INITIATED
)
if
(
m_mmState
==
EMmState
::
MM_REGISTERED_INITIATED
)
{
{
//
e)
Lower layer failure or release of the NAS signalling connection received from lower layers before the
//
"
Lower layer failure or release of the NAS signalling connection received from lower layers before the
// REGISTRATION ACCEPT or REGISTRATION REJECT message is received. The UE shall abort the registration
// REGISTRATION ACCEPT or REGISTRATION REJECT message is received. The UE shall abort the registration
// procedure for initial registration and proceed as ...
// procedure for initial registration and proceed as ...
"
auto
regType
=
m_lastRegistrationRequest
->
registrationType
.
registrationType
;
if
(
regType
==
nas
::
ERegistrationType
::
INITIAL_REGISTRATION
||
regType
==
nas
::
ERegistrationType
::
EMERGENCY_REGISTRATION
)
{
switchRmState
(
ERmState
::
RM_DEREGISTERED
);
switchRmState
(
ERmState
::
RM_DEREGISTERED
);
switchMmState
(
EMmState
::
MM_DEREGISTERED
,
EMmSubState
::
MM_DEREGISTERED_NA
);
switchMmState
(
EMmState
::
MM_DEREGISTERED
,
EMmSubState
::
MM_DEREGISTERED_NA
);
switchUState
(
E5UState
::
U2_NOT_UPDATED
);
switchUState
(
E5UState
::
U2_NOT_UPDATED
);
handleCommonAbnormalRegFailure
(
m_lastRegistrationRequest
->
registrationType
.
registrationType
);
handleAbnormalInitialRegFailure
(
regType
);
}
else
{
handleAbnormalMobilityRegFailure
(
regType
);
}
}
}
// 5.5.2.2.6 Abnormal cases in the UE (in de-registration)
// 5.5.2.2.6 Abnormal cases in the UE (in de-registration)
else
if
(
m_mmState
==
EMmState
::
MM_DEREGISTERED_INITIATED
)
else
if
(
m_mmState
==
EMmState
::
MM_DEREGISTERED_INITIATED
)
...
...
src/ue/mm/mm.hpp
View file @
3cb309f6
...
@@ -95,7 +95,8 @@ class NasMm
...
@@ -95,7 +95,8 @@ class NasMm
void
receiveRegistrationReject
(
const
nas
::
RegistrationReject
&
msg
);
void
receiveRegistrationReject
(
const
nas
::
RegistrationReject
&
msg
);
void
receiveInitialRegistrationReject
(
const
nas
::
RegistrationReject
&
msg
);
void
receiveInitialRegistrationReject
(
const
nas
::
RegistrationReject
&
msg
);
void
receiveMobilityRegistrationReject
(
const
nas
::
RegistrationReject
&
msg
);
void
receiveMobilityRegistrationReject
(
const
nas
::
RegistrationReject
&
msg
);
void
handleCommonAbnormalRegFailure
(
nas
::
ERegistrationType
regType
);
void
handleAbnormalInitialRegFailure
(
nas
::
ERegistrationType
regType
);
void
handleAbnormalMobilityRegFailure
(
nas
::
ERegistrationType
regType
);
private:
/* Authentication */
private:
/* Authentication */
void
receiveAuthenticationRequest
(
const
nas
::
AuthenticationRequest
&
msg
);
void
receiveAuthenticationRequest
(
const
nas
::
AuthenticationRequest
&
msg
);
...
...
src/ue/mm/register.cpp
View file @
3cb309f6
This diff is collapsed.
Click to expand it.
src/ue/mm/timer.cpp
View file @
3cb309f6
...
@@ -34,12 +34,17 @@ void NasMm::onTimerExpire(nas::NasTimer &timer)
...
@@ -34,12 +34,17 @@ void NasMm::onTimerExpire(nas::NasTimer &timer)
break
;
break
;
}
}
case
3510
:
{
case
3510
:
{
// The UE shall abort the registration procedure for initial registration and the NAS signalling connection, if
if
(
m_mmState
==
EMmState
::
MM_REGISTERED_INITIATED
)
// any, shall be released locally if the initial registration request is not for emergency services..
if
(
m_mmState
==
EMmState
::
MM_REGISTERED_INITIATED
&&
m_lastRegistrationRequest
)
{
{
logExpired
();
logExpired
();
auto
regType
=
m_lastRegistrationRequest
->
registrationType
.
registrationType
;
if
(
regType
==
nas
::
ERegistrationType
::
INITIAL_REGISTRATION
||
regType
==
nas
::
ERegistrationType
::
EMERGENCY_REGISTRATION
)
{
// The UE shall abort the registration procedure for initial registration and the NAS signalling
// connection, if any, shall be released locally if the initial registration request is not for
// emergency services..
switchRmState
(
ERmState
::
RM_DEREGISTERED
);
switchRmState
(
ERmState
::
RM_DEREGISTERED
);
switchMmState
(
EMmState
::
MM_DEREGISTERED
,
EMmSubState
::
MM_DEREGISTERED_NA
);
switchMmState
(
EMmState
::
MM_DEREGISTERED
,
EMmSubState
::
MM_DEREGISTERED_NA
);
switchUState
(
E5UState
::
U2_NOT_UPDATED
);
switchUState
(
E5UState
::
U2_NOT_UPDATED
);
...
@@ -50,16 +55,26 @@ void NasMm::onTimerExpire(nas::NasTimer &timer)
...
@@ -50,16 +55,26 @@ void NasMm::onTimerExpire(nas::NasTimer &timer)
localReleaseConnection
();
localReleaseConnection
();
}
}
handleCommonAbnormalRegFailure
(
m_lastRegistrationRequest
->
registrationType
.
registration
Type
);
handleAbnormalInitialRegFailure
(
reg
Type
);
}
}
else
if
(
regType
==
nas
::
ERegistrationType
::
MOBILITY_REGISTRATION_UPDATING
||
regType
==
nas
::
ERegistrationType
::
PERIODIC_REGISTRATION_UPDATING
)
{
localReleaseConnection
();
handleAbnormalMobilityRegFailure
(
regType
);
}
}
break
;
}
case
3511
:
{
// TODO
break
;
break
;
}
}
case
3512
:
{
case
3512
:
{
if
(
m_mmState
==
EMmState
::
MM_REGISTERED
&&
m_cmState
==
ECmState
::
CM_CONNECTED
)
if
(
m_mmState
==
EMmState
::
MM_REGISTERED
&&
m_cmState
==
ECmState
::
CM_CONNECTED
)
{
{
logExpired
();
logExpired
();
sendMobilityRegistration
(
ERegUpdateCause
::
PERIODIC_REGISTRATION
);
sendMobilityRegistration
(
ERegUpdateCause
::
T3512_EXPIRY
);
}
}
break
;
break
;
}
}
...
...
src/ue/types.cpp
View file @
3cb309f6
...
@@ -157,4 +157,51 @@ Json ToJson(const E5UState &state)
...
@@ -157,4 +157,51 @@ Json ToJson(const E5UState &state)
}
}
}
}
Json
ToJson
(
const
ERegUpdateCause
&
v
)
{
switch
(
v
)
{
case
ERegUpdateCause
:
:
UNSPECIFIED
:
return
"UNSPECIFIED"
;
case
ERegUpdateCause
:
:
ENTER_UNLISTED_TRACKING_AREA
:
return
"ENTER_UNLISTED_TRACKING_AREA"
;
case
ERegUpdateCause
:
:
T3512_EXPIRY
:
return
"T3512_EXPIRY"
;
case
ERegUpdateCause
:
:
CONFIGURATION_UPDATE
:
return
"CONFIGURATION_UPDATE"
;
case
ERegUpdateCause
:
:
PAGING_OR_NOTIFICATION
:
return
"PAGING_OR_NOTIFICATION"
;
case
ERegUpdateCause
:
:
INTER_SYSTEM_CHANGE_S1_TO_N1
:
return
"INTER_SYSTEM_CHANGE_S1_TO_N1"
;
case
ERegUpdateCause
:
:
CONNECTION_RECOVERY
:
return
"CONNECTION_RECOVERY"
;
case
ERegUpdateCause
:
:
MM_OR_S1_CAPABILITY_CHANGE
:
return
"MM_OR_S1_CAPABILITY_CHANGE"
;
case
ERegUpdateCause
:
:
USAGE_SETTING_CHANGE
:
return
"USAGE_SETTING_CHANGE"
;
case
ERegUpdateCause
:
:
SLICE_CHANGE
:
return
"SLICE_CHANGE"
;
case
ERegUpdateCause
:
:
DRX_CHANGE
:
return
"DRX_CHANGE"
;
case
ERegUpdateCause
:
:
EMERGENCY_CASE
:
return
"EMERGENCY_CASE"
;
case
ERegUpdateCause
:
:
SMS_OVER_NAS_CHANGE
:
return
"SMS_OVER_NAS_CHANGE"
;
case
ERegUpdateCause
:
:
PS_STATUS_INFORM
:
return
"PS_STATUS_INFORM"
;
case
ERegUpdateCause
:
:
RADIO_CAP_CHANGE
:
return
"RADIO_CAP_CHANGE"
;
case
ERegUpdateCause
:
:
NEW_LADN_NEEDED
:
return
"NEW_LADN_NEEDED"
;
case
ERegUpdateCause
:
:
MICO_MODE_CHANGE
:
return
"MICO_MODE_CHANGE"
;
case
ERegUpdateCause
:
:
ENTER_EQUIVALENT_PLMN_CELL
:
return
"ENTER_EQUIVALENT_PLMN_CELL"
;
case
ERegUpdateCause
:
:
RESTRICTED_SERVICE_AREA
:
return
"RESTRICTED_SERVICE_AREA"
;
default:
return
"?"
;
}
}
}
// namespace nr::ue
}
// namespace nr::ue
src/ue/types.hpp
View file @
3cb309f6
...
@@ -368,9 +368,56 @@ struct UePduSessionInfo
...
@@ -368,9 +368,56 @@ struct UePduSessionInfo
enum
class
ERegUpdateCause
enum
class
ERegUpdateCause
{
{
// unspecified cause
UNSPECIFIED
,
UNSPECIFIED
,
PERIODIC_REGISTRATION
,
// when the UE detects entering a tracking area that is not in the list of tracking areas that the UE previously
RADIO_CAP_CHANGE
// registered in the AMF
ENTER_UNLISTED_TRACKING_AREA
,
// when the periodic registration updating timer T3512 expires
T3512_EXPIRY
,
// when the UE receives a CONFIGURATION UPDATE COMMAND message indicating "registration requested" in the
// Configuration update indication IE as specified in subclauses 5.4.4.3;
CONFIGURATION_UPDATE
,
// when the UE in state 5GMM-REGISTERED.ATTEMPTING-REGISTRATION-UPDATE either receives a paging or the UE receives a
// NOTIFICATION message with access type indicating 3GPP access over the non-3GPP access for PDU sessions associated
// with 3GPP access
PAGING_OR_NOTIFICATION
,
// upon inter-system change from S1 mode to N1 mode
INTER_SYSTEM_CHANGE_S1_TO_N1
,
// when the UE receives an indication of "RRC Connection failure" from the lower layers and does not have signalling
// pending (i.e. when the lower layer requests NAS signalling connection recovery) except for the case specified in
// subclause 5.3.1.4;
// when the UE receives a fallback indication from the lower layers and does not have signalling pending (i.e. when
// the lower layer requests NAS signalling connection recovery, see subclauses 5.3.1.4 and 5.3.1.2);
CONNECTION_RECOVERY
,
// when the UE changes the 5GMM capability or the S1 UE network capability or both
MM_OR_S1_CAPABILITY_CHANGE
,
// when the UE's usage setting changes
USAGE_SETTING_CHANGE
,
// when the UE needs to change the slice(s) it is currently registered to
SLICE_CHANGE
,
// when the UE changes the UE specific DRX parameters
DRX_CHANGE
,
// when the UE in state 5GMM-REGISTERED.ATTEMPTING-REGISTRATION-UPDATE receives a request from the upper layers to
// establish an emergency PDU session or perform emergency services fallback
EMERGENCY_CASE
,
// when the UE needs to register for SMS over NAS, indicate a change in the requirements to use SMS over NAS, or
// de-register from SMS over NAS;
SMS_OVER_NAS_CHANGE
,
// when the UE needs to indicate PDU session status to the network after performing a local release of PDU
// session(s) as specified in subclauses 6.4.1.5 and 6.4.3.5;
PS_STATUS_INFORM
,
// when the UE in 5GMM-IDLE mode changes the radio capability for NG-RAN
RADIO_CAP_CHANGE
,
// when the UE needs to request new LADN information
NEW_LADN_NEEDED
,
// when the UE needs to request the use of MICO mode or needs to stop the use of MICO mode
MICO_MODE_CHANGE
,
// when the UE in 5GMM-CONNECTED mode with RRC inactive indication enters a cell in the current registration area
// belonging to an equivalent PLMN of the registered PLMN and not belonging to the registered PLMN;
ENTER_EQUIVALENT_PLMN_CELL
,
// when the UE receives a SERVICE REJECT message with the 5GMM cause value set to #28 "Restricted service area".
RESTRICTED_SERVICE_AREA
};
};
Json
ToJson
(
const
ECmState
&
state
);
Json
ToJson
(
const
ECmState
&
state
);
...
@@ -380,5 +427,6 @@ Json ToJson(const EMmSubState &state);
...
@@ -380,5 +427,6 @@ Json ToJson(const EMmSubState &state);
Json
ToJson
(
const
E5UState
&
state
);
Json
ToJson
(
const
E5UState
&
state
);
Json
ToJson
(
const
UeConfig
&
v
);
Json
ToJson
(
const
UeConfig
&
v
);
Json
ToJson
(
const
UeTimers
&
v
);
Json
ToJson
(
const
UeTimers
&
v
);
Json
ToJson
(
const
ERegUpdateCause
&
v
);
}
// namespace nr::ue
}
// namespace nr::ue
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