Commit ecc88ce0 authored by aligungr's avatar aligungr

Registration failure abnormal cases handling improvement

parent 78403d60
......@@ -37,9 +37,9 @@ class NasMm
EMmState m_mmState;
EMmSubState m_mmSubState;
// The very last registration request (or null)
// Most recent registration request
std::unique_ptr<nas::RegistrationRequest> m_lastRegistrationRequest{};
// The very last de-registration request (or null)
// Most recent de-registration request
std::unique_ptr<nas::DeRegistrationRequestUeOriginating> m_lastDeregistrationRequest{};
// Indicates that the last de-registration request is issued due to disable 5G services
bool m_lastDeregDueToDisable5g{};
......@@ -102,7 +102,7 @@ class NasMm
void sendRegistration(nas::ERegistrationType registrationType, nas::EFollowOnRequest followOn);
void receiveRegistrationAccept(const nas::RegistrationAccept &msg);
void receiveRegistrationReject(const nas::RegistrationReject &msg);
void incrementRegistrationAttempt();
void handleCommonAbnormalInitialRegFailure(nas::ERegistrationType regType, nas::EMmCause cause);
/* Authentication */
void receiveAuthenticationRequest(const nas::AuthenticationRequest &msg);
......
......@@ -226,11 +226,19 @@ void NasMm::receiveRegistrationReject(const nas::RegistrationReject &msg)
switchRmState(ERmState::RM_DEREGISTERED);
auto handleAbnormalCase = [cause, this]() {
auto handleAbnormalCase = [this, regType, cause]() {
m_logger->debug("Handling Registration Reject abnormal case");
// todo
m_storage.invalidateSim__();
switchMmState(EMmState::MM_NULL, EMmSubState::MM_NULL_NA);
// If the registration request is not an initial registration request for emergency services, upon reception of
// the 5GMM causes #95, #96, #97, #99 and #111 the UE should set the registration attempt counter to 5.
if (regType == nas::ERegistrationType::INITIAL_REGISTRATION)
{
int n = static_cast<int>(cause);
if (n == 95 || n == 96 || n == 97 || n == 99 || n == 111)
m_regCounter = 5;
}
handleCommonAbnormalInitialRegFailure(regType, cause);
};
if (regType == nas::ERegistrationType::INITIAL_REGISTRATION)
......@@ -357,9 +365,9 @@ void NasMm::receiveRegistrationReject(const nas::RegistrationReject &msg)
}
}
void NasMm::incrementRegistrationAttempt()
void NasMm::handleCommonAbnormalInitialRegFailure(nas::ERegistrationType regType, nas::EMmCause cause)
{
m_regCounter++;
// TODO
}
} // 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