Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
UERANSIM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
UERANSIM
Commits
f7e87387
Commit
f7e87387
authored
May 22, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
L3 RRC/NAS developments
parent
5f51d36f
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
27 additions
and
22 deletions
+27
-22
src/ue/nas/mm/auth.cpp
src/ue/nas/mm/auth.cpp
+1
-1
src/ue/nas/mm/config.cpp
src/ue/nas/mm/config.cpp
+3
-3
src/ue/nas/mm/dereg.cpp
src/ue/nas/mm/dereg.cpp
+2
-2
src/ue/nas/mm/ecall.cpp
src/ue/nas/mm/ecall.cpp
+1
-1
src/ue/nas/mm/radio.cpp
src/ue/nas/mm/radio.cpp
+2
-2
src/ue/nas/mm/register.cpp
src/ue/nas/mm/register.cpp
+10
-9
src/ue/nas/mm/service.cpp
src/ue/nas/mm/service.cpp
+5
-3
src/ue/nas/storage.cpp
src/ue/nas/storage.cpp
+2
-0
src/ue/nas/storage.hpp
src/ue/nas/storage.hpp
+1
-0
src/ue/nas/usim/usim.hpp
src/ue/nas/usim/usim.hpp
+0
-1
No files found.
src/ue/nas/mm/auth.cpp
View file @
f7e87387
...
...
@@ -434,7 +434,7 @@ void NasMm::receiveAuthenticationReject(const nas::AuthenticationReject &msg)
// until switching off the UE or the UICC containing the USIM is removed
m_storage
->
storedGuti
->
clear
();
m_storage
->
lastVisitedRegisteredTai
->
clear
();
m_
usim
->
m_taiList
=
{}
;
m_
storage
->
taiList
->
clear
()
;
m_usim
->
m_currentNsCtx
=
{};
m_usim
->
m_nonCurrentNsCtx
=
{};
m_usim
->
invalidate
();
...
...
src/ue/nas/mm/config.cpp
View file @
f7e87387
...
...
@@ -49,11 +49,11 @@ void NasMm::receiveConfigurationUpdate(const nas::ConfigurationUpdateCommand &ms
if
(
msg
.
taiList
.
has_value
())
{
hasNewConfig
=
true
;
m_usim
->
m_taiList
=
*
msg
.
taiList
;
m_storage
->
taiList
->
set
(
*
msg
.
taiList
);
Tai
currentTai
=
m_base
->
shCtx
.
getCurrentTai
();
if
(
currentTai
.
hasValue
()
&&
nas
::
utils
::
TaiListContains
(
m_usim
->
m_taiList
,
nas
::
VTrackingAreaIdentity
{
currentTai
}))
if
(
currentTai
.
hasValue
()
&&
nas
::
utils
::
TaiListContains
(
*
msg
.
taiList
,
nas
::
VTrackingAreaIdentity
{
currentTai
}))
m_storage
->
lastVisitedRegisteredTai
->
set
(
currentTai
);
}
...
...
src/ue/nas/mm/dereg.cpp
View file @
f7e87387
...
...
@@ -196,7 +196,7 @@ void NasMm::receiveDeregistrationRequest(const nas::DeRegistrationRequestUeTermi
// enter the state 5GMM-DEREGISTERED.PLMN-SEARCH in order to perform a PLMN selection according to 3GPP
// TS 23.122 [5]; otherwise the UE shall enter the state 5GMM-DEREGISTERED.ATTEMPTING-REGISTRATION."
m_storage
->
storedGuti
->
clear
();
m_
usim
->
m_taiList
=
{}
;
m_
storage
->
taiList
->
clear
()
;
m_storage
->
lastVisitedRegisteredTai
->
clear
();
m_usim
->
m_equivalentPlmnList
=
{};
m_usim
->
m_currentNsCtx
=
{};
...
...
@@ -220,7 +220,7 @@ void NasMm::receiveDeregistrationRequest(const nas::DeRegistrationRequestUeTermi
switchUState
(
E5UState
::
U3_ROAMING_NOT_ALLOWED
);
m_storage
->
storedGuti
->
clear
();
m_storage
->
lastVisitedRegisteredTai
->
clear
();
m_
usim
->
m_taiList
=
{}
;
m_
storage
->
taiList
->
clear
()
;
m_usim
->
m_currentNsCtx
=
{};
m_usim
->
m_nonCurrentNsCtx
=
{};
}
...
...
src/ue/nas/mm/ecall.cpp
View file @
f7e87387
...
...
@@ -91,7 +91,7 @@ bool NasMm::switchToECallInactivityIfNeeded()
// Perform item c) in 5.5.3
m_storage
->
storedGuti
->
clear
();
m_
usim
->
m_taiList
=
{}
;
m_
storage
->
taiList
->
clear
()
;
m_storage
->
lastVisitedRegisteredTai
->
clear
();
m_usim
->
m_equivalentPlmnList
=
{};
m_usim
->
m_currentNsCtx
=
{};
...
...
src/ue/nas/mm/radio.cpp
View file @
f7e87387
...
...
@@ -173,7 +173,7 @@ void NasMm::handleActiveCellChange()
else
switchMmState
(
EMmSubState
::
MM_REGISTERED_PS
);
if
(
!
nas
::
utils
::
TaiListContains
(
m_
usim
->
m_taiList
,
nas
::
VTrackingAreaIdentity
{
currentTai
}))
if
(
!
nas
::
utils
::
TaiListContains
(
m_
storage
->
taiList
->
get
()
,
nas
::
VTrackingAreaIdentity
{
currentTai
}))
sendMobilityRegistration
(
ERegUpdateCause
::
ENTER_UNLISTED_TRACKING_AREA
);
else
m_storage
->
lastVisitedRegisteredTai
->
set
(
currentTai
);
...
...
@@ -198,7 +198,7 @@ void NasMm::handleActiveCellChange()
else
switchMmState
(
EMmSubState
::
MM_DEREGISTERED_PS
);
if
(
nas
::
utils
::
TaiListContains
(
m_
usim
->
m_taiList
,
nas
::
VTrackingAreaIdentity
{
currentTai
}))
if
(
nas
::
utils
::
TaiListContains
(
m_
storage
->
taiList
->
get
()
,
nas
::
VTrackingAreaIdentity
{
currentTai
}))
m_storage
->
lastVisitedRegisteredTai
->
set
(
currentTai
);
}
}
...
...
src/ue/nas/mm/register.cpp
View file @
f7e87387
...
...
@@ -232,9 +232,10 @@ void NasMm::receiveRegistrationAccept(const nas::RegistrationAccept &msg)
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
{}
);
m_
storage
->
taiList
->
set
(
msg
.
taiList
.
value_or
(
nas
::
IE5gsTrackingAreaIdentityList
{})
);
Tai
currentTai
=
m_base
->
shCtx
.
getCurrentTai
();
if
(
currentTai
.
hasValue
()
&&
nas
::
utils
::
TaiListContains
(
m_usim
->
m_taiList
,
nas
::
VTrackingAreaIdentity
{
currentTai
}))
if
(
currentTai
.
hasValue
()
&&
nas
::
utils
::
TaiListContains
(
m_storage
->
taiList
->
get
(),
nas
::
VTrackingAreaIdentity
{
currentTai
}))
m_storage
->
lastVisitedRegisteredTai
->
set
(
currentTai
);
// Store the service area list
...
...
@@ -346,11 +347,10 @@ void NasMm::receiveMobilityRegistrationAccept(const nas::RegistrationAccept &msg
// list. If there is no TAI list received, the UE shall consider the old TAI list as valid."
if
(
msg
.
taiList
.
has_value
())
{
m_
usim
->
m_taiList
=
*
msg
.
taiList
;
m_
storage
->
taiList
->
set
(
*
msg
.
taiList
)
;
Tai
currentTai
=
m_base
->
shCtx
.
getCurrentTai
();
if
(
currentTai
.
hasValue
()
&&
nas
::
utils
::
TaiListContains
(
m_usim
->
m_taiList
,
nas
::
VTrackingAreaIdentity
{
currentTai
}))
if
(
currentTai
.
hasValue
()
&&
nas
::
utils
::
TaiListContains
(
*
msg
.
taiList
,
nas
::
VTrackingAreaIdentity
{
currentTai
}))
m_storage
->
lastVisitedRegisteredTai
->
set
(
currentTai
);
}
...
...
@@ -529,7 +529,7 @@ void NasMm::receiveInitialRegistrationReject(const nas::RegistrationReject &msg)
{
m_storage
->
storedGuti
->
clear
();
m_storage
->
lastVisitedRegisteredTai
->
clear
();
m_
usim
->
m_taiList
=
{}
;
m_
storage
->
taiList
->
clear
()
;
m_usim
->
m_currentNsCtx
=
{};
m_usim
->
m_nonCurrentNsCtx
=
{};
}
...
...
@@ -678,7 +678,7 @@ void NasMm::receiveMobilityRegistrationReject(const nas::RegistrationReject &msg
{
m_storage
->
storedGuti
->
clear
();
m_storage
->
lastVisitedRegisteredTai
->
clear
();
m_
usim
->
m_taiList
=
{}
;
m_
storage
->
taiList
->
clear
()
;
m_usim
->
m_currentNsCtx
=
{};
m_usim
->
m_nonCurrentNsCtx
=
{};
}
...
...
@@ -817,7 +817,7 @@ void NasMm::handleAbnormalInitialRegFailure(nas::ERegistrationType regType)
{
// The UE shall delete 5G-GUTI, TAI list, last visited TAI, list of equivalent PLMNs and ngKSI, ..
m_storage
->
storedGuti
->
clear
();
m_
usim
->
m_taiList
=
{}
;
m_
storage
->
taiList
->
clear
()
;
m_storage
->
lastVisitedRegisteredTai
->
clear
();
m_usim
->
m_equivalentPlmnList
=
{};
m_usim
->
m_currentNsCtx
=
{};
...
...
@@ -847,7 +847,8 @@ void NasMm::handleAbnormalMobilityRegFailure(nas::ERegistrationType regType)
if
(
m_regCounter
<
5
)
{
auto
tai
=
m_base
->
shCtx
.
getCurrentTai
();
bool
includedInTaiList
=
nas
::
utils
::
TaiListContains
(
m_usim
->
m_taiList
,
nas
::
VTrackingAreaIdentity
{
tai
});
bool
includedInTaiList
=
nas
::
utils
::
TaiListContains
(
m_storage
->
taiList
->
get
(),
nas
::
VTrackingAreaIdentity
{
tai
});
// "If the TAI of the current serving cell is not included in the TAI list or the 5GS update status is different
// to 5U1 UPDATED"
...
...
src/ue/nas/mm/service.cpp
View file @
f7e87387
...
...
@@ -34,7 +34,8 @@ void NasMm::sendServiceRequest(EServiceReqCause reqCause)
m_logger
->
err
(
"Service Request canceled, UE not in 5U1 UPDATED state"
);
return
;
}
if
(
!
nas
::
utils
::
TaiListContains
(
m_usim
->
m_taiList
,
nas
::
VTrackingAreaIdentity
{
m_base
->
shCtx
.
getCurrentTai
()}))
if
(
!
nas
::
utils
::
TaiListContains
(
m_storage
->
taiList
->
get
(),
nas
::
VTrackingAreaIdentity
{
m_base
->
shCtx
.
getCurrentTai
()}))
{
m_logger
->
err
(
"Service Request canceled, current TAI is not in the TAI list"
);
return
;
...
...
@@ -288,7 +289,7 @@ void NasMm::receiveServiceReject(const nas::ServiceReject &msg)
{
m_storage
->
storedGuti
->
clear
();
m_storage
->
lastVisitedRegisteredTai
->
clear
();
m_
usim
->
m_taiList
=
{}
;
m_
storage
->
taiList
->
clear
()
;
m_usim
->
m_currentNsCtx
=
{};
m_usim
->
m_nonCurrentNsCtx
=
{};
}
...
...
@@ -321,7 +322,8 @@ void NasMm::receiveServiceReject(const nas::ServiceReject &msg)
if
(
tai
.
hasValue
())
{
m_storage
->
forbiddenTaiListRoaming
->
add
(
tai
);
nas
::
utils
::
RemoveFromTaiList
(
m_usim
->
m_taiList
,
nas
::
VTrackingAreaIdentity
{
tai
});
m_storage
->
taiList
->
mutate
(
[
&
tai
](
auto
&
value
)
{
nas
::
utils
::
RemoveFromTaiList
(
value
,
nas
::
VTrackingAreaIdentity
{
tai
});
});
}
}
...
...
src/ue/nas/storage.cpp
View file @
f7e87387
...
...
@@ -29,6 +29,8 @@ MmStorage::MmStorage(TaskBase *base) : m_base{base}
storedGuti
=
std
::
make_unique
<
nas
::
NasSlot
<
nas
::
IE5gsMobileIdentity
>>
(
0
,
std
::
nullopt
);
taiList
=
std
::
make_unique
<
nas
::
NasSlot
<
nas
::
IE5gsTrackingAreaIdentityList
>>
(
0
,
std
::
nullopt
);
lastVisitedRegisteredTai
=
std
::
make_unique
<
nas
::
NasSlot
<
Tai
>>
(
0
,
std
::
nullopt
);
forbiddenTaiListRoaming
=
std
::
make_unique
<
nas
::
NasList
<
Tai
>>
(
...
...
src/ue/nas/storage.hpp
View file @
f7e87387
...
...
@@ -22,6 +22,7 @@ class MmStorage
std
::
unique_ptr
<
nas
::
NasSlot
<
nas
::
IE5gsMobileIdentity
>>
storedSuci
;
std
::
unique_ptr
<
nas
::
NasSlot
<
nas
::
IE5gsMobileIdentity
>>
storedGuti
;
std
::
unique_ptr
<
nas
::
NasSlot
<
nas
::
IE5gsTrackingAreaIdentityList
>>
taiList
;
std
::
unique_ptr
<
nas
::
NasSlot
<
Tai
>>
lastVisitedRegisteredTai
;
std
::
unique_ptr
<
nas
::
NasList
<
Tai
>>
forbiddenTaiListRoaming
;
std
::
unique_ptr
<
nas
::
NasList
<
Tai
>>
forbiddenTaiListRps
;
...
...
src/ue/nas/usim/usim.hpp
View file @
f7e87387
...
...
@@ -31,7 +31,6 @@ class Usim
E5UState
m_uState
{};
// Plmn related
nas
::
IE5gsTrackingAreaIdentityList
m_taiList
{};
nas
::
IEPlmnList
m_equivalentPlmnList
{};
nas
::
IEPlmnList
m_forbiddenPlmnList
{};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment