Commit 4f597b8f authored by aligungr's avatar aligungr

UE registration abnormal cases improvement

parent b15d899f
...@@ -251,10 +251,13 @@ void NasMm::setN1Capability(bool enabled) ...@@ -251,10 +251,13 @@ void NasMm::setN1Capability(bool enabled)
bool NasMm::hasEmergency() bool NasMm::hasEmergency()
{ {
// Indicates emergency services are required (even if registered for normal initial registration) // Indicates emergency services are required (even if registered for normal initial registration)
// This usually happens if it 'has' or 'need' some emergency PDU Session. // This happens if it 'has' or 'need' some emergency PDU Session, as well.
if (m_rmState == ERmState::RM_REGISTERED && m_registeredForEmergency) if (m_rmState == ERmState::RM_REGISTERED && m_registeredForEmergency)
return true; return true;
if (m_mmState == EMmState::MM_REGISTERED_INITIATED && m_lastRegistrationRequest &&
m_lastRegistrationRequest->registrationType.registrationType == nas::ERegistrationType::EMERGENCY_REGISTRATION)
return true;
// TODO: Other case which is an emergency PDU session is established, or need to be established (and wanted to be // TODO: Other case which is an emergency PDU session is established, or need to be established (and wanted to be
// established soon) // established soon)
......
...@@ -26,7 +26,7 @@ void NasMm::sendRegistration(nas::ERegistrationType regType, bool dueToDereg) ...@@ -26,7 +26,7 @@ void NasMm::sendRegistration(nas::ERegistrationType regType, bool dueToDereg)
// 5.5.1.2.7 Abnormal cases in the UE // 5.5.1.2.7 Abnormal cases in the UE
// a) Timer T3346 is running. // a) Timer T3346 is running.
if (m_timers->t3346.isRunning() && regType == nas::ERegistrationType::INITIAL_REGISTRATION) if (m_timers->t3346.isRunning() && regType == nas::ERegistrationType::INITIAL_REGISTRATION && !hasEmergency())
{ {
// From 24.501: A UE configured with one or more access identities equal to 1, 2, or 11-15 applicable in the // From 24.501: A UE configured with one or more access identities equal to 1, 2, or 11-15 applicable in the
// selected PLMN as specified in subclause 4.5.2. Definition derived from 3GPP TS 22.261 // selected PLMN as specified in subclause 4.5.2. Definition derived from 3GPP TS 22.261
...@@ -129,7 +129,7 @@ void NasMm::receiveRegistrationAccept(const nas::RegistrationAccept &msg) ...@@ -129,7 +129,7 @@ void NasMm::receiveRegistrationAccept(const nas::RegistrationAccept &msg)
m_storage.m_equivalentPlmnList = msg.equivalentPLMNs.value_or(nas::IEPlmnList{}); m_storage.m_equivalentPlmnList = msg.equivalentPLMNs.value_or(nas::IEPlmnList{});
// .. if the initial registration procedure is not for emergency services, the UE shall remove from the list any // .. if the initial registration procedure is not for emergency services, the UE shall remove from the list any
// PLMN code that is already in the list of "forbidden PLMNs". .. // PLMN code that is already in the list of "forbidden PLMNs". ..
if (m_lastRegistrationRequest->registrationType.registrationType != nas::ERegistrationType::EMERGENCY_REGISTRATION) if (!hasEmergency())
{ {
utils::EraseWhere(m_storage.m_equivalentPlmnList.plmns, [this](auto &plmn) { utils::EraseWhere(m_storage.m_equivalentPlmnList.plmns, [this](auto &plmn) {
return std::any_of(m_storage.m_forbiddenPlmnList.plmns.begin(), m_storage.m_forbiddenPlmnList.plmns.end(), return std::any_of(m_storage.m_forbiddenPlmnList.plmns.begin(), m_storage.m_forbiddenPlmnList.plmns.end(),
......
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