Commit 81e531d1 authored by aligungr's avatar aligungr

Registration attempt counter reset handling

parent 0031283d
...@@ -229,7 +229,7 @@ void NasMm::receiveDeregistrationRequest(const nas::DeRegistrationRequestUeTermi ...@@ -229,7 +229,7 @@ void NasMm::receiveDeregistrationRequest(const nas::DeRegistrationRequestUeTermi
if (cause == nas::EMmCause::PLMN_NOT_ALLOWED || cause == nas::EMmCause::TA_NOT_ALLOWED || if (cause == nas::EMmCause::PLMN_NOT_ALLOWED || cause == nas::EMmCause::TA_NOT_ALLOWED ||
cause == nas::EMmCause::ROAMING_NOT_ALLOWED_IN_TA || cause == nas::EMmCause::NO_SUITIBLE_CELLS_IN_TA || cause == nas::EMmCause::ROAMING_NOT_ALLOWED_IN_TA || cause == nas::EMmCause::NO_SUITIBLE_CELLS_IN_TA ||
cause == nas::EMmCause::N1_MODE_NOT_ALLOWED) cause == nas::EMmCause::N1_MODE_NOT_ALLOWED)
m_regCounter = 0; resetRegAttemptCounter();
if (cause == nas::EMmCause::PLMN_NOT_ALLOWED) if (cause == nas::EMmCause::PLMN_NOT_ALLOWED)
{ {
......
...@@ -97,6 +97,7 @@ class NasMm ...@@ -97,6 +97,7 @@ class NasMm
void receiveMobilityRegistrationReject(const nas::RegistrationReject &msg); void receiveMobilityRegistrationReject(const nas::RegistrationReject &msg);
void handleAbnormalInitialRegFailure(nas::ERegistrationType regType); void handleAbnormalInitialRegFailure(nas::ERegistrationType regType);
void handleAbnormalMobilityRegFailure(nas::ERegistrationType regType); void handleAbnormalMobilityRegFailure(nas::ERegistrationType regType);
void resetRegAttemptCounter();
private: /* Authentication */ private: /* Authentication */
void receiveAuthenticationRequest(const nas::AuthenticationRequest &msg); void receiveAuthenticationRequest(const nas::AuthenticationRequest &msg);
......
...@@ -232,7 +232,7 @@ void NasMm::receiveInitialRegistrationAccept(const nas::RegistrationAccept &msg) ...@@ -232,7 +232,7 @@ void NasMm::receiveInitialRegistrationAccept(const nas::RegistrationAccept &msg)
// Upon receipt of the REGISTRATION ACCEPT message, the UE shall reset the registration attempt counter, enter state // Upon receipt of the REGISTRATION ACCEPT message, the UE shall reset the registration attempt counter, enter state
// 5GMM-REGISTERED and set the 5GS update status to 5U1 UPDATED. // 5GMM-REGISTERED and set the 5GS update status to 5U1 UPDATED.
m_regCounter = 0; resetRegAttemptCounter();
switchMmState(EMmState::MM_REGISTERED, EMmSubState::MM_REGISTERED_NORMAL_SERVICE); switchMmState(EMmState::MM_REGISTERED, EMmSubState::MM_REGISTERED_NORMAL_SERVICE);
switchRmState(ERmState::RM_REGISTERED); switchRmState(ERmState::RM_REGISTERED);
switchUState(E5UState::U1_UPDATED); switchUState(E5UState::U1_UPDATED);
...@@ -342,7 +342,7 @@ void NasMm::receiveMobilityRegistrationAccept(const nas::RegistrationAccept &msg ...@@ -342,7 +342,7 @@ void NasMm::receiveMobilityRegistrationAccept(const nas::RegistrationAccept &msg
// "Upon receipt of the REGISTRATION ACCEPT message, the UE shall reset the registration attempt counter and service // "Upon receipt of the REGISTRATION ACCEPT message, the UE shall reset the registration attempt counter and service
// request attempt counter, enter state 5GMM-REGISTERED and set the 5GS update status to 5U1 UPDATED." // request attempt counter, enter state 5GMM-REGISTERED and set the 5GS update status to 5U1 UPDATED."
m_regCounter = 0; resetRegAttemptCounter();
m_serCounter = 0; m_serCounter = 0;
switchMmState(EMmState::MM_REGISTERED, EMmSubState::MM_REGISTERED_NORMAL_SERVICE); switchMmState(EMmState::MM_REGISTERED, EMmSubState::MM_REGISTERED_NORMAL_SERVICE);
switchRmState(ERmState::RM_REGISTERED); switchRmState(ERmState::RM_REGISTERED);
...@@ -529,7 +529,7 @@ void NasMm::receiveInitialRegistrationReject(const nas::RegistrationReject &msg) ...@@ -529,7 +529,7 @@ void NasMm::receiveInitialRegistrationReject(const nas::RegistrationReject &msg)
cause == nas::EMmCause::ROAMING_NOT_ALLOWED_IN_TA || cause == nas::EMmCause::NO_SUITIBLE_CELLS_IN_TA || cause == nas::EMmCause::ROAMING_NOT_ALLOWED_IN_TA || cause == nas::EMmCause::NO_SUITIBLE_CELLS_IN_TA ||
cause == nas::EMmCause::N1_MODE_NOT_ALLOWED || cause == nas::EMmCause::SERVING_NETWORK_NOT_AUTHORIZED) cause == nas::EMmCause::N1_MODE_NOT_ALLOWED || cause == nas::EMmCause::SERVING_NETWORK_NOT_AUTHORIZED)
{ {
m_regCounter = 0; resetRegAttemptCounter();
} }
if (cause == nas::EMmCause::ILLEGAL_UE || cause == nas::EMmCause::ILLEGAL_ME || if (cause == nas::EMmCause::ILLEGAL_UE || cause == nas::EMmCause::ILLEGAL_ME ||
...@@ -689,7 +689,7 @@ void NasMm::receiveMobilityRegistrationReject(const nas::RegistrationReject &msg ...@@ -689,7 +689,7 @@ void NasMm::receiveMobilityRegistrationReject(const nas::RegistrationReject &msg
cause == nas::EMmCause::ROAMING_NOT_ALLOWED_IN_TA || cause == nas::EMmCause::NO_SUITIBLE_CELLS_IN_TA || cause == nas::EMmCause::ROAMING_NOT_ALLOWED_IN_TA || cause == nas::EMmCause::NO_SUITIBLE_CELLS_IN_TA ||
cause == nas::EMmCause::N1_MODE_NOT_ALLOWED || cause == nas::EMmCause::SERVING_NETWORK_NOT_AUTHORIZED) cause == nas::EMmCause::N1_MODE_NOT_ALLOWED || cause == nas::EMmCause::SERVING_NETWORK_NOT_AUTHORIZED)
{ {
m_regCounter = 0; resetRegAttemptCounter();
} }
if (cause == nas::EMmCause::ILLEGAL_UE || cause == nas::EMmCause::ILLEGAL_ME || if (cause == nas::EMmCause::ILLEGAL_UE || cause == nas::EMmCause::ILLEGAL_ME ||
...@@ -843,4 +843,13 @@ void NasMm::handleAbnormalMobilityRegFailure(nas::ERegistrationType regType) ...@@ -843,4 +843,13 @@ void NasMm::handleAbnormalMobilityRegFailure(nas::ERegistrationType regType)
} }
} }
void NasMm::resetRegAttemptCounter()
{
// "When the registration attempt counter is reset,
// the UE shall stop timer T3519 if running, and delete any stored SUCI"
m_regCounter = 0;
m_timers->t3519.stop();
m_storage.m_storedSuci = {};
}
} // namespace nr::ue } // namespace nr::ue
\ No newline at end of file
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