Commit f1e28191 authored by aligungr's avatar aligungr

T3516 handling

parent c2122e03
......@@ -371,6 +371,11 @@ void NasMm::receiveAuthenticationReject(const nas::AuthenticationReject &msg)
{
m_logger->err("Authentication Reject received.");
// The RAND and RES* values stored in the ME shall be deleted and timer T3516, if running, shall be stopped
m_usim->m_rand = {};
m_usim->m_resStar = {};
m_timers->t3516.stop();
if (msg.eapMessage.has_value() && msg.eapMessage->eap->code != eap::ECode::FAILURE)
{
m_logger->warn("Network sent EAP with inconvenient type in AuthenticationReject, ignoring EAP IE.");
......
......@@ -232,6 +232,15 @@ void NasMm::onSwitchMmState(EMmState oldState, EMmState newState, EMmSubState ol
m_usim->m_nonCurrentNsCtx = {};
}
}
// If the UE enters the 5GMM state 5GMM-DEREGISTERED or 5GMM-NULL,
// The RAND and RES* values stored in the ME shall be deleted and timer T3516, if running, shall be stopped
if (newState == EMmState::MM_DEREGISTERED || newState == EMmState::MM_NULL)
{
m_usim->m_rand = {};
m_usim->m_resStar = {};
m_timers->t3516.stop();
}
}
void NasMm::onSwitchRmState(ERmState oldState, ERmState newState)
......@@ -278,6 +287,12 @@ void NasMm::onSwitchCmState(ECmState oldState, ECmState newState)
nas::ESwitchOff::NORMAL_DE_REGISTRATION)
switchMmState(EMmState::MM_DEREGISTERED, EMmSubState::MM_DEREGISTERED_NA);
}
// If the UE enters the 5GMM-IDLE, the RAND and RES* values stored
// in the ME shall be deleted and timer T3516, if running, shall be stopped
m_usim->m_rand = {};
m_usim->m_resStar = {};
m_timers->t3516.stop();
}
}
......
......@@ -220,6 +220,11 @@ void NasMm::receiveRegistrationAccept(const nas::RegistrationAccept &msg)
receiveInitialRegistrationAccept(msg);
else
receiveMobilityRegistrationAccept(msg);
// The RAND and RES* values stored in the ME shall be deleted and timer T3516, if running, shall be stopped
m_usim->m_rand = {};
m_usim->m_resStar = {};
m_timers->t3516.stop();
}
void NasMm::receiveInitialRegistrationAccept(const nas::RegistrationAccept &msg)
......@@ -451,6 +456,11 @@ void NasMm::receiveRegistrationReject(const nas::RegistrationReject &msg)
receiveInitialRegistrationReject(msg);
else
receiveMobilityRegistrationReject(msg);
// The RAND and RES* values stored in the ME shall be deleted and timer T3516, if running, shall be stopped
m_usim->m_rand = {};
m_usim->m_resStar = {};
m_timers->t3516.stop();
}
void NasMm::receiveInitialRegistrationReject(const nas::RegistrationReject &msg)
......
......@@ -59,6 +59,11 @@ void NasMm::receiveSecurityModeCommand(const nas::SecurityModeCommand &msg)
m_logger->err("Rejecting Security Mode Command with cause [%s]", nas::utils::EnumToString(cause));
};
// The RAND and RES* values stored in the ME shall be deleted and timer T3516, if running, shall be stopped
m_usim->m_rand = {};
m_usim->m_resStar = {};
m_timers->t3516.stop();
// ============================== Check the received ngKSI ==============================
bool locallyDerived = false;
......
......@@ -212,6 +212,11 @@ void NasMm::receiveServiceReject(const nas::ServiceReject &msg)
m_serCounter = 0;
m_timers->t3517.stop();
// The RAND and RES* values stored in the ME shall be deleted and timer T3516, if running, shall be stopped
m_usim->m_rand = {};
m_usim->m_resStar = {};
m_timers->t3516.stop();
auto cause = msg.mmCause.value;
m_logger->err("Service Reject received with cause [%s]", nas::utils::EnumToString(cause));
......
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