Commit d3c6d99c authored by aligungr's avatar aligungr

L3 RRC/NAS developments

parent feaeffb8
......@@ -200,7 +200,7 @@ class NasSlot
{
}
T get()
const T &get()
{
autoClearIfNecessary();
......
......@@ -52,13 +52,13 @@ bool NasMm::isInNonAllowedArea()
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;
if (m_usim->m_servingCell.has_value())
{
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}}))
return true;
}
......
......@@ -59,7 +59,7 @@ void NasMm::receiveConfigurationUpdate(const nas::ConfigurationUpdateCommand &ms
if (msg.serviceAreaList.has_value())
{
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
......
......@@ -72,7 +72,7 @@ void NasMm::performPlmnSelection()
continue; // If it's the HPLMN, it's already added above
if (nas::utils::PlmnListContains(m_usim->m_forbiddenPlmnList, plmn))
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;
if (nas::utils::PlmnListContains(m_usim->m_equivalentPlmnList, plmn))
candidates.push_back(plmn);
......
......@@ -232,7 +232,7 @@ void NasMm::receiveInitialRegistrationAccept(const nas::RegistrationAccept &msg)
// Store the TAI list as a registration area
m_usim->m_taiList = msg.taiList.value_or(nas::IE5gsTrackingAreaIdentityList{});
// 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 ..
m_usim->m_equivalentPlmnList = msg.equivalentPLMNs.value_or(nas::IEPlmnList{});
......@@ -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));
// 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
// 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}
FORBIDDEN_TAI_LIST_SIZE, FORBIDDEN_TAI_CLEAR_PERIOD, [this](const std::vector<Tai> &buffer, size_t count) {
BackupTaiListInSharedCtx(buffer, count, m_base->shCtx.forbiddenTaiRps);
});
m_serviceAreaList = std::make_unique<nas::NasSlot<nas::IEServiceAreaList>>(0, std::nullopt);
}
} // namespace nr::ue
\ No newline at end of file
......@@ -21,6 +21,7 @@ class MmStorage
public:
std::unique_ptr<nas::NasList<Tai>> m_forbiddenTaiListRoaming;
std::unique_ptr<nas::NasList<Tai>> m_forbiddenTaiListRps;
std::unique_ptr<nas::NasSlot<nas::IEServiceAreaList>> m_serviceAreaList;
public:
explicit MmStorage(TaskBase *base);
......
......@@ -42,7 +42,6 @@ class Usim
nas::IE5gsTrackingAreaIdentityList m_taiList{};
nas::IEPlmnList m_equivalentPlmnList{};
nas::IEPlmnList m_forbiddenPlmnList{};
nas::IEServiceAreaList m_serviceAreaList{};
// Security related
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