Commit c50e6308 authored by aligungr's avatar aligungr

UE authentication procedure improvements

parent 68448016
...@@ -222,18 +222,30 @@ void NasMm::receiveAuthenticationRequestEap(const nas::AuthenticationRequest &ms ...@@ -222,18 +222,30 @@ void NasMm::receiveAuthenticationRequestEap(const nas::AuthenticationRequest &ms
void NasMm::receiveAuthenticationRequest5gAka(const nas::AuthenticationRequest &msg) void NasMm::receiveAuthenticationRequest5gAka(const nas::AuthenticationRequest &msg)
{ {
auto sendFailure = [this](nas::EMmCause cause) { auto sendFailure = [this](nas::EMmCause cause, std::optional<OctetString> &&auts = std::nullopt) {
if (cause == nas::EMmCause::SYNCH_FAILURE)
m_logger->debug("Sending Authentication Failure due to SQN out of range");
else
m_logger->err("Sending Authentication Failure with cause [%s]", nas::utils::EnumToString(cause)); m_logger->err("Sending Authentication Failure with cause [%s]", nas::utils::EnumToString(cause));
// Clear parameters stored in volatile memory of ME
m_usim->m_rand = {}; m_usim->m_rand = {};
m_usim->m_res = {}; m_usim->m_res = {};
m_usim->m_resStar = {}; m_usim->m_resStar = {};
// Stop T3516 if running
m_timers->t3516.stop(); m_timers->t3516.stop();
// Send Authentication Failure
nas::AuthenticationFailure resp{}; nas::AuthenticationFailure resp{};
resp.mmCause.value = cause; resp.mmCause.value = cause;
if (auts.has_value())
{
resp.authenticationFailureParameter = {};
resp.authenticationFailureParameter->rawData = std::move(*auts);
}
sendNasMessage(resp); sendNasMessage(resp);
}; };
...@@ -325,9 +337,7 @@ void NasMm::receiveAuthenticationRequest5gAka(const nas::AuthenticationRequest & ...@@ -325,9 +337,7 @@ void NasMm::receiveAuthenticationRequest5gAka(const nas::AuthenticationRequest &
} }
else if (autnCheck == EAutnValidationRes::SYNCHRONISATION_FAILURE) else if (autnCheck == EAutnValidationRes::SYNCHRONISATION_FAILURE)
{ {
// TODO sendFailure(nas::EMmCause::SYNCH_FAILURE);
m_logger->err("SYNCHRONISATION_FAILURE case not implemented yet in AUTN validation");
sendFailure(nas::EMmCause::UNSPECIFIED_PROTOCOL_ERROR);
} }
else else
{ {
......
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