diff --git a/srsepc/src/mme/s1ap.cc b/srsepc/src/mme/s1ap.cc index 4b1bbd688..0dce45c41 100644 --- a/srsepc/src/mme/s1ap.cc +++ b/srsepc/src/mme/s1ap.cc @@ -542,8 +542,9 @@ s1ap::activate_eps_bearer(uint64_t imsi, uint8_t ebi) uint32_t s1ap::allocate_m_tmsi(uint64_t imsi) { - uint32_t m_tmsi = m_next_m_tmsi++; - //uint32_t m_tmsi = m_next_m_tmsi; + uint32_t m_tmsi = m_next_m_tmsi; + m_next_m_tmsi = (m_next_m_tmsi + 1) % UINT32_MAX; + m_tmsi_to_imsi.insert(std::pair(m_tmsi,imsi)); m_s1ap_log->debug("Allocated M-TMSI 0x%x to IMSI %015lu,\n",m_tmsi,imsi); return m_tmsi; diff --git a/srsepc/src/mme/s1ap_nas_transport.cc b/srsepc/src/mme/s1ap_nas_transport.cc index eb64a09eb..f64e4ff0d 100644 --- a/srsepc/src/mme/s1ap_nas_transport.cc +++ b/srsepc/src/mme/s1ap_nas_transport.cc @@ -25,6 +25,7 @@ */ #include +#include #include "mme/s1ap.h" #include "mme/s1ap_nas_transport.h" #include "srslte/common/security.h"