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 ...@@ -170,14 +170,14 @@ void NasSm::receiveEstablishmentAccept(const nas::PduSessionEstablishmentAccept
m_logger->info("PDU Session establishment is successful PSI[%d]", pduSession->psi); 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); abortEstablishmentRequest(msg.pti);
freePduSessionId(psi);
} }
void NasSm::receiveEstablishmentReject(const nas::PduSessionEstablishmentReject &msg) void NasSm::receiveEstablishmentReject(const nas::PduSessionEstablishmentReject &msg)
...@@ -205,4 +205,14 @@ void NasSm::receiveEstablishmentReject(const nas::PduSessionEstablishmentReject ...@@ -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 } // namespace nr::ue
\ No newline at end of file
...@@ -67,6 +67,7 @@ class NasSm ...@@ -67,6 +67,7 @@ class NasSm
void sendEstablishmentRequest(const SessionConfig &config); void sendEstablishmentRequest(const SessionConfig &config);
void receiveEstablishmentAccept(const nas::PduSessionEstablishmentAccept &msg); void receiveEstablishmentAccept(const nas::PduSessionEstablishmentAccept &msg);
void receiveEstablishmentReject(const nas::PduSessionEstablishmentReject &msg); void receiveEstablishmentReject(const nas::PduSessionEstablishmentReject &msg);
void receiveEstablishmentRoutingFailure(const nas::PduSessionEstablishmentRequest &msg);
void abortEstablishmentRequest(int pti); void abortEstablishmentRequest(int pti);
/* Timer */ /* Timer */
...@@ -75,7 +76,7 @@ class NasSm ...@@ -75,7 +76,7 @@ class NasSm
void onTransactionTimerExpire(int pti); void onTransactionTimerExpire(int pti);
/* Utils */ /* Utils */
bool checkPtiAndPsi(const nas::SmMessage& msg); bool checkPtiAndPsi(const nas::SmMessage &msg);
public: public:
/* Interface */ /* Interface */
......
...@@ -50,6 +50,9 @@ void NasSm::receiveSmMessage(const nas::SmMessage &msg) ...@@ -50,6 +50,9 @@ void NasSm::receiveSmMessage(const nas::SmMessage &msg)
case nas::EMessageType::PDU_SESSION_ESTABLISHMENT_REJECT: case nas::EMessageType::PDU_SESSION_ESTABLISHMENT_REJECT:
receiveEstablishmentReject((const nas::PduSessionEstablishmentReject &)msg); receiveEstablishmentReject((const nas::PduSessionEstablishmentReject &)msg);
break; break;
case nas::EMessageType::PDU_SESSION_ESTABLISHMENT_REQUEST:
receiveEstablishmentRoutingFailure((const nas::PduSessionEstablishmentRequest &)msg);
break;
case nas::EMessageType::FIVEG_SM_STATUS: case nas::EMessageType::FIVEG_SM_STATUS:
receiveSmStatus((const nas::FiveGSmStatus &)msg); receiveSmStatus((const nas::FiveGSmStatus &)msg);
break; 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