Commit aec7f601 authored by aligungr's avatar aligungr

Service reject handling

parent 5a88cd6f
...@@ -177,9 +177,31 @@ void NasMm::receiveServiceReject(const nas::ServiceReject &msg) ...@@ -177,9 +177,31 @@ void NasMm::receiveServiceReject(const nas::ServiceReject &msg)
return; return;
} }
if (msg.sht == nas::ESecurityHeaderType::NOT_PROTECTED)
{
m_logger->warn("Not protected Service Reject message received");
sendMmStatus(nas::EMmCause::UNSPECIFIED_PROTOCOL_ERROR);
return;
}
// "On receipt of the SERVICE REJECT message, if the UE is in state 5GMM-SERVICE-REQUEST-INITIATED and the message
// is integrity protected, the UE shall reset the service request attempt counter and stop timer T3517 if running."
m_serCounter = 0;
m_timers->t3517.stop();
auto cause = msg.mmCause.value; auto cause = msg.mmCause.value;
m_logger->err("Service Request failed [%s]", nas::utils::EnumToString(cause)); m_logger->err("Service Request failed [%s]", nas::utils::EnumToString(cause));
// Handle PDU session status
if (msg.pduSessionStatus.has_value() && msg.sht != nas::ESecurityHeaderType::NOT_PROTECTED)
{
auto statusInUe = m_sm->getPduSessionStatus();
auto statusInNw = msg.pduSessionStatus->psi;
for (int i = 1; i < 16; i++)
if (statusInUe[i] && !statusInNw[i])
m_sm->localReleaseSession(i);
}
// Handle EAP message // Handle EAP message
if (msg.eapMessage.has_value()) if (msg.eapMessage.has_value())
{ {
......
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