Commit 3cb309f6 authored by aligungr's avatar aligungr

Registration updating abnormal case handling

parent 28510561
......@@ -208,15 +208,25 @@ void NasMm::onSwitchCmState(ECmState oldState, ECmState newState)
// 5.5.1.2.7 Abnormal cases in the UE (in registration)
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
// 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);
switchMmState(EMmState::MM_DEREGISTERED, EMmSubState::MM_DEREGISTERED_NA);
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)
else if (m_mmState == EMmState::MM_DEREGISTERED_INITIATED)
......
......@@ -95,7 +95,8 @@ class NasMm
void receiveRegistrationReject(const nas::RegistrationReject &msg);
void receiveInitialRegistrationReject(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 */
void receiveAuthenticationRequest(const nas::AuthenticationRequest &msg);
......
This diff is collapsed.
......@@ -34,12 +34,17 @@ void NasMm::onTimerExpire(nas::NasTimer &timer)
break;
}
case 3510: {
// 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..
if (m_mmState == EMmState::MM_REGISTERED_INITIATED && m_lastRegistrationRequest)
if (m_mmState == EMmState::MM_REGISTERED_INITIATED)
{
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);
switchMmState(EMmState::MM_DEREGISTERED, EMmSubState::MM_DEREGISTERED_NA);
switchUState(E5UState::U2_NOT_UPDATED);
......@@ -50,16 +55,26 @@ void NasMm::onTimerExpire(nas::NasTimer &timer)
localReleaseConnection();
}
handleCommonAbnormalRegFailure(m_lastRegistrationRequest->registrationType.registrationType);
handleAbnormalInitialRegFailure(regType);
}
else if (regType == nas::ERegistrationType::MOBILITY_REGISTRATION_UPDATING ||
regType == nas::ERegistrationType::PERIODIC_REGISTRATION_UPDATING)
{
localReleaseConnection();
handleAbnormalMobilityRegFailure(regType);
}
}
break;
}
case 3511: {
// TODO
break;
}
case 3512: {
if (m_mmState == EMmState::MM_REGISTERED && m_cmState == ECmState::CM_CONNECTED)
{
logExpired();
sendMobilityRegistration(ERegUpdateCause::PERIODIC_REGISTRATION);
sendMobilityRegistration(ERegUpdateCause::T3512_EXPIRY);
}
break;
}
......
......@@ -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
......@@ -368,9 +368,56 @@ struct UePduSessionInfo
enum class ERegUpdateCause
{
// unspecified cause
UNSPECIFIED,
PERIODIC_REGISTRATION,
RADIO_CAP_CHANGE
// when the UE detects entering a tracking area that is not in the list of tracking areas that the UE previously
// 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);
......@@ -380,5 +427,6 @@ Json ToJson(const EMmSubState &state);
Json ToJson(const E5UState &state);
Json ToJson(const UeConfig &v);
Json ToJson(const UeTimers &v);
Json ToJson(const ERegUpdateCause &v);
} // namespace nr::ue
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment