Commit d3c6d99c authored by aligungr's avatar aligungr

L3 RRC/NAS developments

parent feaeffb8
...@@ -200,7 +200,7 @@ class NasSlot ...@@ -200,7 +200,7 @@ class NasSlot
{ {
} }
T get() const T &get()
{ {
autoClearIfNecessary(); autoClearIfNecessary();
......
...@@ -52,13 +52,13 @@ bool NasMm::isInNonAllowedArea() ...@@ -52,13 +52,13 @@ bool NasMm::isInNonAllowedArea()
auto &plmn = *m_usim->m_currentPlmn; auto &plmn = *m_usim->m_currentPlmn;
if (nas::utils::ServiceAreaListForbidsPlmn(m_usim->m_serviceAreaList, nas::utils::PlmnFrom(plmn))) if (nas::utils::ServiceAreaListForbidsPlmn(m_storage->m_serviceAreaList->get(), nas::utils::PlmnFrom(plmn)))
return true; return true;
if (m_usim->m_servingCell.has_value()) if (m_usim->m_servingCell.has_value())
{ {
if (nas::utils::ServiceAreaListForbidsTai( if (nas::utils::ServiceAreaListForbidsTai(
m_usim->m_serviceAreaList, m_storage->m_serviceAreaList->get(),
nas::VTrackingAreaIdentity{nas::utils::PlmnFrom(plmn), octet3{m_usim->m_servingCell->tac}})) nas::VTrackingAreaIdentity{nas::utils::PlmnFrom(plmn), octet3{m_usim->m_servingCell->tac}}))
return true; return true;
} }
......
...@@ -59,7 +59,7 @@ void NasMm::receiveConfigurationUpdate(const nas::ConfigurationUpdateCommand &ms ...@@ -59,7 +59,7 @@ void NasMm::receiveConfigurationUpdate(const nas::ConfigurationUpdateCommand &ms
if (msg.serviceAreaList.has_value()) if (msg.serviceAreaList.has_value())
{ {
hasNewConfig = true; hasNewConfig = true;
m_usim->m_serviceAreaList = *msg.serviceAreaList; m_storage->m_serviceAreaList->set(*msg.serviceAreaList);
} }
// "If the UE receives new NITZ information in the CONFIGURATION UPDATE COMMAND message, the UE considers the new // "If the UE receives new NITZ information in the CONFIGURATION UPDATE COMMAND message, the UE considers the new
......
...@@ -72,7 +72,7 @@ void NasMm::performPlmnSelection() ...@@ -72,7 +72,7 @@ void NasMm::performPlmnSelection()
continue; // If it's the HPLMN, it's already added above continue; // If it's the HPLMN, it's already added above
if (nas::utils::PlmnListContains(m_usim->m_forbiddenPlmnList, plmn)) if (nas::utils::PlmnListContains(m_usim->m_forbiddenPlmnList, plmn))
continue; continue;
if (nas::utils::ServiceAreaListForbidsPlmn(m_usim->m_serviceAreaList, nas::utils::PlmnFrom(plmn))) if (nas::utils::ServiceAreaListForbidsPlmn(m_storage->m_serviceAreaList->get(), nas::utils::PlmnFrom(plmn)))
continue; continue;
if (nas::utils::PlmnListContains(m_usim->m_equivalentPlmnList, plmn)) if (nas::utils::PlmnListContains(m_usim->m_equivalentPlmnList, plmn))
candidates.push_back(plmn); candidates.push_back(plmn);
......
...@@ -232,7 +232,7 @@ void NasMm::receiveInitialRegistrationAccept(const nas::RegistrationAccept &msg) ...@@ -232,7 +232,7 @@ void NasMm::receiveInitialRegistrationAccept(const nas::RegistrationAccept &msg)
// Store the TAI list as a registration area // Store the TAI list as a registration area
m_usim->m_taiList = msg.taiList.value_or(nas::IE5gsTrackingAreaIdentityList{}); m_usim->m_taiList = msg.taiList.value_or(nas::IE5gsTrackingAreaIdentityList{});
// Store the service area list // Store the service area list
m_usim->m_serviceAreaList = msg.serviceAreaList.value_or(nas::IEServiceAreaList{}); m_storage->m_serviceAreaList->set(msg.serviceAreaList.value_or(nas::IEServiceAreaList{}));
// Store the E-PLMN list and .. // Store the E-PLMN list and ..
m_usim->m_equivalentPlmnList = msg.equivalentPLMNs.value_or(nas::IEPlmnList{}); m_usim->m_equivalentPlmnList = msg.equivalentPLMNs.value_or(nas::IEPlmnList{});
...@@ -355,7 +355,7 @@ void NasMm::receiveMobilityRegistrationAccept(const nas::RegistrationAccept &msg ...@@ -355,7 +355,7 @@ void NasMm::receiveMobilityRegistrationAccept(const nas::RegistrationAccept &msg
nas::utils::AddToPlmnList(m_usim->m_equivalentPlmnList, nas::utils::PlmnFrom(*m_usim->m_currentPlmn)); nas::utils::AddToPlmnList(m_usim->m_equivalentPlmnList, nas::utils::PlmnFrom(*m_usim->m_currentPlmn));
// Store the service area list // Store the service area list
m_usim->m_serviceAreaList = msg.serviceAreaList.value_or(nas::IEServiceAreaList{}); m_storage->m_serviceAreaList->set(msg.serviceAreaList.value_or(nas::IEServiceAreaList{}));
// "Upon receipt of the REGISTRATION ACCEPT message, the UE shall reset the registration attempt counter and service // "Upon receipt of the REGISTRATION ACCEPT message, the UE shall reset the registration attempt counter and service
// request attempt counter, enter state 5GMM-REGISTERED and set the 5GS update status to 5U1 UPDATED." // request attempt counter, enter state 5GMM-REGISTERED and set the 5GS update status to 5U1 UPDATED."
......
...@@ -34,6 +34,8 @@ MmStorage::MmStorage(TaskBase *base) : m_base{base} ...@@ -34,6 +34,8 @@ MmStorage::MmStorage(TaskBase *base) : m_base{base}
FORBIDDEN_TAI_LIST_SIZE, FORBIDDEN_TAI_CLEAR_PERIOD, [this](const std::vector<Tai> &buffer, size_t count) { FORBIDDEN_TAI_LIST_SIZE, FORBIDDEN_TAI_CLEAR_PERIOD, [this](const std::vector<Tai> &buffer, size_t count) {
BackupTaiListInSharedCtx(buffer, count, m_base->shCtx.forbiddenTaiRps); BackupTaiListInSharedCtx(buffer, count, m_base->shCtx.forbiddenTaiRps);
}); });
m_serviceAreaList = std::make_unique<nas::NasSlot<nas::IEServiceAreaList>>(0, std::nullopt);
} }
} // namespace nr::ue } // namespace nr::ue
\ No newline at end of file
...@@ -21,6 +21,7 @@ class MmStorage ...@@ -21,6 +21,7 @@ class MmStorage
public: public:
std::unique_ptr<nas::NasList<Tai>> m_forbiddenTaiListRoaming; std::unique_ptr<nas::NasList<Tai>> m_forbiddenTaiListRoaming;
std::unique_ptr<nas::NasList<Tai>> m_forbiddenTaiListRps; std::unique_ptr<nas::NasList<Tai>> m_forbiddenTaiListRps;
std::unique_ptr<nas::NasSlot<nas::IEServiceAreaList>> m_serviceAreaList;
public: public:
explicit MmStorage(TaskBase *base); explicit MmStorage(TaskBase *base);
......
...@@ -42,7 +42,6 @@ class Usim ...@@ -42,7 +42,6 @@ class Usim
nas::IE5gsTrackingAreaIdentityList m_taiList{}; nas::IE5gsTrackingAreaIdentityList m_taiList{};
nas::IEPlmnList m_equivalentPlmnList{}; nas::IEPlmnList m_equivalentPlmnList{};
nas::IEPlmnList m_forbiddenPlmnList{}; nas::IEPlmnList m_forbiddenPlmnList{};
nas::IEServiceAreaList m_serviceAreaList{};
// Security related // Security related
std::unique_ptr<NasSecurityContext> m_currentNsCtx{}; std::unique_ptr<NasSecurityContext> m_currentNsCtx{};
......
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