Commit bae4d5c5 authored by aligungr's avatar aligungr

PDU session establishment abnormal case improvements

parent 3a393848
......@@ -170,14 +170,14 @@ void NasSm::receiveEstablishmentAccept(const nas::PduSessionEstablishmentAccept
m_logger->info("PDU Session establishment is successful PSI[%d]", pduSession->psi);
}
void NasSm::abortEstablishmentRequest(int pti)
void NasSm::receiveEstablishmentRoutingFailure(const nas::PduSessionEstablishmentRequest &msg)
{
int psi = m_procedureTransactions[pti].psi;
m_logger->err("PDU Session Establishment Request received due to a routing failure");
m_logger->debug("PDU Session Establishment Procedure aborted for PTI[%d], PSI[%d]", pti, psi);
if (!checkPtiAndPsi(msg))
return;
freeProcedureTransactionId(pti);
freePduSessionId(psi);
abortEstablishmentRequest(msg.pti);
}
void NasSm::receiveEstablishmentReject(const nas::PduSessionEstablishmentReject &msg)
......@@ -205,4 +205,14 @@ void NasSm::receiveEstablishmentReject(const nas::PduSessionEstablishmentReject
}
}
void NasSm::abortEstablishmentRequest(int pti)
{
int psi = m_procedureTransactions[pti].psi;
m_logger->debug("PDU Session Establishment Procedure aborted for PTI[%d], PSI[%d]", pti, psi);
freeProcedureTransactionId(pti);
freePduSessionId(psi);
}
} // namespace nr::ue
\ No newline at end of file
......@@ -67,6 +67,7 @@ class NasSm
void sendEstablishmentRequest(const SessionConfig &config);
void receiveEstablishmentAccept(const nas::PduSessionEstablishmentAccept &msg);
void receiveEstablishmentReject(const nas::PduSessionEstablishmentReject &msg);
void receiveEstablishmentRoutingFailure(const nas::PduSessionEstablishmentRequest &msg);
void abortEstablishmentRequest(int pti);
/* Timer */
......@@ -75,7 +76,7 @@ class NasSm
void onTransactionTimerExpire(int pti);
/* Utils */
bool checkPtiAndPsi(const nas::SmMessage& msg);
bool checkPtiAndPsi(const nas::SmMessage &msg);
public:
/* Interface */
......
......@@ -50,6 +50,9 @@ void NasSm::receiveSmMessage(const nas::SmMessage &msg)
case nas::EMessageType::PDU_SESSION_ESTABLISHMENT_REJECT:
receiveEstablishmentReject((const nas::PduSessionEstablishmentReject &)msg);
break;
case nas::EMessageType::PDU_SESSION_ESTABLISHMENT_REQUEST:
receiveEstablishmentRoutingFailure((const nas::PduSessionEstablishmentRequest &)msg);
break;
case nas::EMessageType::FIVEG_SM_STATUS:
receiveSmStatus((const nas::FiveGSmStatus &)msg);
break;
......
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