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
9be407e9
Commit
9be407e9
authored
May 21, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
L3 RRC/NAS developments
parent
509824ae
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
50 additions
and
28 deletions
+50
-28
src/lib/nas/ie3.cpp
src/lib/nas/ie3.cpp
+5
-0
src/lib/nas/ie3.hpp
src/lib/nas/ie3.hpp
+1
-0
src/lib/nas/storage.hpp
src/lib/nas/storage.hpp
+5
-0
src/ue/nas/mm/access.cpp
src/ue/nas/mm/access.cpp
+2
-2
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
+1
-1
src/ue/nas/mm/dereg.cpp
src/ue/nas/mm/dereg.cpp
+3
-3
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
+6
-1
src/ue/nas/mm/register.cpp
src/ue/nas/mm/register.cpp
+13
-9
src/ue/nas/mm/service.cpp
src/ue/nas/mm/service.cpp
+3
-3
src/ue/nas/storage.cpp
src/ue/nas/storage.cpp
+5
-3
src/ue/nas/storage.hpp
src/ue/nas/storage.hpp
+4
-3
src/ue/nas/usim/usim.hpp
src/ue/nas/usim/usim.hpp
+0
-1
No files found.
src/lib/nas/ie3.cpp
View file @
9be407e9
...
@@ -32,6 +32,11 @@ IE5gsTrackingAreaIdentity::IE5gsTrackingAreaIdentity(int mcc, int mnc, bool isLo
...
@@ -32,6 +32,11 @@ IE5gsTrackingAreaIdentity::IE5gsTrackingAreaIdentity(int mcc, int mnc, bool isLo
{
{
}
}
IE5gsTrackingAreaIdentity
::
IE5gsTrackingAreaIdentity
(
const
Tai
&
tai
)
:
mcc
(
tai
.
plmn
.
mcc
),
mnc
(
tai
.
plmn
.
mnc
),
isLongMnc
(
tai
.
plmn
.
isLongMnc
),
trackingAreaCode
(
tai
.
tac
)
{
}
IE5gsTrackingAreaIdentity
IE5gsTrackingAreaIdentity
::
Decode
(
const
OctetView
&
stream
)
IE5gsTrackingAreaIdentity
IE5gsTrackingAreaIdentity
::
Decode
(
const
OctetView
&
stream
)
{
{
auto
plmn
=
VPlmn
::
Decode
(
stream
);
auto
plmn
=
VPlmn
::
Decode
(
stream
);
...
...
src/lib/nas/ie3.hpp
View file @
9be407e9
...
@@ -34,6 +34,7 @@ struct IE5gsTrackingAreaIdentity : InformationElement3
...
@@ -34,6 +34,7 @@ struct IE5gsTrackingAreaIdentity : InformationElement3
IE5gsTrackingAreaIdentity
()
=
default
;
IE5gsTrackingAreaIdentity
()
=
default
;
IE5gsTrackingAreaIdentity
(
int
mcc
,
int
mnc
,
bool
isLongMnc
,
const
octet3
&
trackingAreaCode
);
IE5gsTrackingAreaIdentity
(
int
mcc
,
int
mnc
,
bool
isLongMnc
,
const
octet3
&
trackingAreaCode
);
explicit
IE5gsTrackingAreaIdentity
(
const
Tai
&
tai
);
static
IE5gsTrackingAreaIdentity
Decode
(
const
OctetView
&
stream
);
static
IE5gsTrackingAreaIdentity
Decode
(
const
OctetView
&
stream
);
static
void
Encode
(
const
IE5gsTrackingAreaIdentity
&
ie
,
OctetString
&
stream
);
static
void
Encode
(
const
IE5gsTrackingAreaIdentity
&
ie
,
OctetString
&
stream
);
...
...
src/lib/nas/storage.hpp
View file @
9be407e9
...
@@ -207,6 +207,11 @@ class NasSlot
...
@@ -207,6 +207,11 @@ class NasSlot
return
m_value
;
return
m_value
;
}
}
void
clear
()
{
set
(
T
{});
}
void
set
(
const
T
&
value
)
void
set
(
const
T
&
value
)
{
{
autoClearIfNecessary
();
autoClearIfNecessary
();
...
...
src/ue/nas/mm/access.cpp
View file @
9be407e9
...
@@ -52,12 +52,12 @@ bool NasMm::isInNonAllowedArea()
...
@@ -52,12 +52,12 @@ bool NasMm::isInNonAllowedArea()
if
(
!
plmn
.
hasValue
())
if
(
!
plmn
.
hasValue
())
return
false
;
return
false
;
if
(
nas
::
utils
::
ServiceAreaListForbidsPlmn
(
m_storage
->
m_
serviceAreaList
->
get
(),
nas
::
utils
::
PlmnFrom
(
plmn
)))
if
(
nas
::
utils
::
ServiceAreaListForbidsPlmn
(
m_storage
->
serviceAreaList
->
get
(),
nas
::
utils
::
PlmnFrom
(
plmn
)))
return
true
;
return
true
;
int
tac
=
m_base
->
shCtx
.
currentCell
.
get
<
int
>
([](
auto
&
value
)
{
return
value
.
tac
;
});
int
tac
=
m_base
->
shCtx
.
currentCell
.
get
<
int
>
([](
auto
&
value
)
{
return
value
.
tac
;
});
if
(
nas
::
utils
::
ServiceAreaListForbidsTai
(
m_storage
->
m_
serviceAreaList
->
get
(),
if
(
nas
::
utils
::
ServiceAreaListForbidsTai
(
m_storage
->
serviceAreaList
->
get
(),
nas
::
VTrackingAreaIdentity
{
nas
::
utils
::
PlmnFrom
(
plmn
),
octet3
{
tac
}}))
nas
::
VTrackingAreaIdentity
{
nas
::
utils
::
PlmnFrom
(
plmn
),
octet3
{
tac
}}))
return
true
;
return
true
;
...
...
src/ue/nas/mm/auth.cpp
View file @
9be407e9
...
@@ -433,7 +433,7 @@ void NasMm::receiveAuthenticationReject(const nas::AuthenticationReject &msg)
...
@@ -433,7 +433,7 @@ void NasMm::receiveAuthenticationReject(const nas::AuthenticationReject &msg)
// Delete the stored 5G-GUTI, TAI list, last visited registered TAI and ngKSI. The USIM shall be considered invalid
// Delete the stored 5G-GUTI, TAI list, last visited registered TAI and ngKSI. The USIM shall be considered invalid
// until switching off the UE or the UICC containing the USIM is removed
// until switching off the UE or the UICC containing the USIM is removed
m_usim
->
m_storedGuti
=
{};
m_usim
->
m_storedGuti
=
{};
m_
usim
->
m_lastVisitedRegisteredTai
=
{}
;
m_
storage
->
lastVisitedRegisteredTai
->
clear
()
;
m_usim
->
m_taiList
=
{};
m_usim
->
m_taiList
=
{};
m_usim
->
m_currentNsCtx
=
{};
m_usim
->
m_currentNsCtx
=
{};
m_usim
->
m_nonCurrentNsCtx
=
{};
m_usim
->
m_nonCurrentNsCtx
=
{};
...
...
src/ue/nas/mm/config.cpp
View file @
9be407e9
...
@@ -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_storage
->
m_
serviceAreaList
->
set
(
*
msg
.
serviceAreaList
);
m_storage
->
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
...
...
src/ue/nas/mm/dereg.cpp
View file @
9be407e9
...
@@ -197,7 +197,7 @@ void NasMm::receiveDeregistrationRequest(const nas::DeRegistrationRequestUeTermi
...
@@ -197,7 +197,7 @@ void NasMm::receiveDeregistrationRequest(const nas::DeRegistrationRequestUeTermi
// TS 23.122 [5]; otherwise the UE shall enter the state 5GMM-DEREGISTERED.ATTEMPTING-REGISTRATION."
// TS 23.122 [5]; otherwise the UE shall enter the state 5GMM-DEREGISTERED.ATTEMPTING-REGISTRATION."
m_usim
->
m_storedGuti
=
{};
m_usim
->
m_storedGuti
=
{};
m_usim
->
m_taiList
=
{};
m_usim
->
m_taiList
=
{};
m_
usim
->
m_lastVisitedRegisteredTai
=
{}
;
m_
storage
->
lastVisitedRegisteredTai
->
clear
()
;
m_usim
->
m_equivalentPlmnList
=
{};
m_usim
->
m_equivalentPlmnList
=
{};
m_usim
->
m_currentNsCtx
=
{};
m_usim
->
m_currentNsCtx
=
{};
m_usim
->
m_nonCurrentNsCtx
=
{};
m_usim
->
m_nonCurrentNsCtx
=
{};
...
@@ -219,7 +219,7 @@ void NasMm::receiveDeregistrationRequest(const nas::DeRegistrationRequestUeTermi
...
@@ -219,7 +219,7 @@ void NasMm::receiveDeregistrationRequest(const nas::DeRegistrationRequestUeTermi
{
{
switchUState
(
E5UState
::
U3_ROAMING_NOT_ALLOWED
);
switchUState
(
E5UState
::
U3_ROAMING_NOT_ALLOWED
);
m_usim
->
m_storedGuti
=
{};
m_usim
->
m_storedGuti
=
{};
m_
usim
->
m_lastVisitedRegisteredTai
=
{}
;
m_
storage
->
lastVisitedRegisteredTai
->
clear
()
;
m_usim
->
m_taiList
=
{};
m_usim
->
m_taiList
=
{};
m_usim
->
m_currentNsCtx
=
{};
m_usim
->
m_currentNsCtx
=
{};
m_usim
->
m_nonCurrentNsCtx
=
{};
m_usim
->
m_nonCurrentNsCtx
=
{};
...
@@ -250,7 +250,7 @@ void NasMm::receiveDeregistrationRequest(const nas::DeRegistrationRequestUeTermi
...
@@ -250,7 +250,7 @@ void NasMm::receiveDeregistrationRequest(const nas::DeRegistrationRequestUeTermi
{
{
Tai
tai
=
m_base
->
shCtx
.
getCurrentTai
();
Tai
tai
=
m_base
->
shCtx
.
getCurrentTai
();
if
(
tai
.
hasValue
())
if
(
tai
.
hasValue
())
m_storage
->
m_
forbiddenTaiListRoaming
->
add
(
tai
);
m_storage
->
forbiddenTaiListRoaming
->
add
(
tai
);
}
}
if
(
cause
==
nas
::
EMmCause
::
ILLEGAL_UE
||
cause
==
nas
::
EMmCause
::
FIVEG_SERVICES_NOT_ALLOWED
)
if
(
cause
==
nas
::
EMmCause
::
ILLEGAL_UE
||
cause
==
nas
::
EMmCause
::
FIVEG_SERVICES_NOT_ALLOWED
)
...
...
src/ue/nas/mm/ecall.cpp
View file @
9be407e9
...
@@ -89,7 +89,7 @@ bool NasMm::switchToECallInactivityIfNeeded()
...
@@ -89,7 +89,7 @@ bool NasMm::switchToECallInactivityIfNeeded()
// Perform item c) in 5.5.3
// Perform item c) in 5.5.3
m_usim
->
m_storedGuti
=
{};
m_usim
->
m_storedGuti
=
{};
m_usim
->
m_taiList
=
{};
m_usim
->
m_taiList
=
{};
m_
usim
->
m_lastVisitedRegisteredTai
=
{}
;
m_
storage
->
lastVisitedRegisteredTai
->
clear
()
;
m_usim
->
m_equivalentPlmnList
=
{};
m_usim
->
m_equivalentPlmnList
=
{};
m_usim
->
m_currentNsCtx
=
{};
m_usim
->
m_currentNsCtx
=
{};
m_usim
->
m_nonCurrentNsCtx
=
{};
m_usim
->
m_nonCurrentNsCtx
=
{};
...
...
src/ue/nas/mm/radio.cpp
View file @
9be407e9
...
@@ -87,7 +87,7 @@ void NasMm::performPlmnSelection()
...
@@ -87,7 +87,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_storage
->
m_
serviceAreaList
->
get
(),
nas
::
utils
::
PlmnFrom
(
plmn
)))
if
(
nas
::
utils
::
ServiceAreaListForbidsPlmn
(
m_storage
->
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
);
...
@@ -175,6 +175,8 @@ void NasMm::handleActiveCellChange(const Tai &lastTai)
...
@@ -175,6 +175,8 @@ void NasMm::handleActiveCellChange(const Tai &lastTai)
if
(
!
nas
::
utils
::
TaiListContains
(
m_usim
->
m_taiList
,
nas
::
VTrackingAreaIdentity
{
currentTai
}))
if
(
!
nas
::
utils
::
TaiListContains
(
m_usim
->
m_taiList
,
nas
::
VTrackingAreaIdentity
{
currentTai
}))
sendMobilityRegistration
(
ERegUpdateCause
::
ENTER_UNLISTED_TRACKING_AREA
);
sendMobilityRegistration
(
ERegUpdateCause
::
ENTER_UNLISTED_TRACKING_AREA
);
else
m_storage
->
lastVisitedRegisteredTai
->
set
(
currentTai
);
}
}
}
}
else
if
(
m_mmState
==
EMmState
::
MM_DEREGISTERED
)
else
if
(
m_mmState
==
EMmState
::
MM_DEREGISTERED
)
...
@@ -195,6 +197,9 @@ void NasMm::handleActiveCellChange(const Tai &lastTai)
...
@@ -195,6 +197,9 @@ void NasMm::handleActiveCellChange(const Tai &lastTai)
switchMmState
(
EMmSubState
::
MM_DEREGISTERED_LIMITED_SERVICE
);
switchMmState
(
EMmSubState
::
MM_DEREGISTERED_LIMITED_SERVICE
);
else
else
switchMmState
(
EMmSubState
::
MM_DEREGISTERED_PS
);
switchMmState
(
EMmSubState
::
MM_DEREGISTERED_PS
);
if
(
nas
::
utils
::
TaiListContains
(
m_usim
->
m_taiList
,
nas
::
VTrackingAreaIdentity
{
currentTai
}))
m_storage
->
lastVisitedRegisteredTai
->
set
(
currentTai
);
}
}
}
}
else
if
(
m_mmState
==
EMmState
::
MM_REGISTERED_INITIATED
||
m_mmState
==
EMmState
::
MM_DEREGISTERED_INITIATED
||
else
if
(
m_mmState
==
EMmState
::
MM_REGISTERED_INITIATED
||
m_mmState
==
EMmState
::
MM_DEREGISTERED_INITIATED
||
...
...
src/ue/nas/mm/register.cpp
View file @
9be407e9
...
@@ -80,7 +80,9 @@ void NasMm::sendInitialRegistration(EInitialRegCause regCause)
...
@@ -80,7 +80,9 @@ void NasMm::sendInitialRegistration(EInitialRegCause regCause)
// Assign other fields
// Assign other fields
request
->
mobileIdentity
=
getOrGeneratePreferredId
();
request
->
mobileIdentity
=
getOrGeneratePreferredId
();
request
->
lastVisitedRegisteredTai
=
m_usim
->
m_lastVisitedRegisteredTai
;
if
(
m_storage
->
lastVisitedRegisteredTai
->
get
().
hasValue
())
request
->
lastVisitedRegisteredTai
=
nas
::
IE5gsTrackingAreaIdentity
{
m_storage
->
lastVisitedRegisteredTai
->
get
()};
if
(
!
requestedNssai
.
slices
.
empty
())
if
(
!
requestedNssai
.
slices
.
empty
())
request
->
requestedNSSAI
=
nas
::
utils
::
NssaiFrom
(
requestedNssai
);
request
->
requestedNSSAI
=
nas
::
utils
::
NssaiFrom
(
requestedNssai
);
request
->
ueSecurityCapability
=
createSecurityCapabilityIe
();
request
->
ueSecurityCapability
=
createSecurityCapabilityIe
();
...
@@ -173,7 +175,9 @@ void NasMm::sendMobilityRegistration(ERegUpdateCause updateCause)
...
@@ -173,7 +175,9 @@ void NasMm::sendMobilityRegistration(ERegUpdateCause updateCause)
}
}
// Assign other fields
// Assign other fields
request
->
lastVisitedRegisteredTai
=
m_usim
->
m_lastVisitedRegisteredTai
;
if
(
m_storage
->
lastVisitedRegisteredTai
->
get
().
hasValue
())
request
->
lastVisitedRegisteredTai
=
nas
::
IE5gsTrackingAreaIdentity
{
m_storage
->
lastVisitedRegisteredTai
->
get
()};
request
->
mobileIdentity
=
getOrGeneratePreferredId
();
request
->
mobileIdentity
=
getOrGeneratePreferredId
();
if
(
!
requestedNssai
.
slices
.
empty
())
if
(
!
requestedNssai
.
slices
.
empty
())
request
->
requestedNSSAI
=
nas
::
utils
::
NssaiFrom
(
requestedNssai
);
request
->
requestedNSSAI
=
nas
::
utils
::
NssaiFrom
(
requestedNssai
);
...
@@ -232,7 +236,7 @@ void NasMm::receiveInitialRegistrationAccept(const nas::RegistrationAccept &msg)
...
@@ -232,7 +236,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_storage
->
m_
serviceAreaList
->
set
(
msg
.
serviceAreaList
.
value_or
(
nas
::
IEServiceAreaList
{}));
m_storage
->
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 +359,7 @@ void NasMm::receiveMobilityRegistrationAccept(const nas::RegistrationAccept &msg
...
@@ -355,7 +359,7 @@ void NasMm::receiveMobilityRegistrationAccept(const nas::RegistrationAccept &msg
nas
::
utils
::
AddToPlmnList
(
m_usim
->
m_equivalentPlmnList
,
nas
::
utils
::
PlmnFrom
(
m_base
->
shCtx
.
getCurrentPlmn
()));
nas
::
utils
::
AddToPlmnList
(
m_usim
->
m_equivalentPlmnList
,
nas
::
utils
::
PlmnFrom
(
m_base
->
shCtx
.
getCurrentPlmn
()));
// Store the service area list
// Store the service area list
m_storage
->
m_
serviceAreaList
->
set
(
msg
.
serviceAreaList
.
value_or
(
nas
::
IEServiceAreaList
{}));
m_storage
->
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."
...
@@ -513,7 +517,7 @@ void NasMm::receiveInitialRegistrationReject(const nas::RegistrationReject &msg)
...
@@ -513,7 +517,7 @@ void NasMm::receiveInitialRegistrationReject(const nas::RegistrationReject &msg)
cause
==
nas
::
EMmCause
::
NO_SUITIBLE_CELLS_IN_TA
||
cause
==
nas
::
EMmCause
::
N1_MODE_NOT_ALLOWED
)
cause
==
nas
::
EMmCause
::
NO_SUITIBLE_CELLS_IN_TA
||
cause
==
nas
::
EMmCause
::
N1_MODE_NOT_ALLOWED
)
{
{
m_usim
->
m_storedGuti
=
{};
m_usim
->
m_storedGuti
=
{};
m_
usim
->
m_lastVisitedRegisteredTai
=
{}
;
m_
storage
->
lastVisitedRegisteredTai
->
clear
()
;
m_usim
->
m_taiList
=
{};
m_usim
->
m_taiList
=
{};
m_usim
->
m_currentNsCtx
=
{};
m_usim
->
m_currentNsCtx
=
{};
m_usim
->
m_nonCurrentNsCtx
=
{};
m_usim
->
m_nonCurrentNsCtx
=
{};
...
@@ -565,7 +569,7 @@ void NasMm::receiveInitialRegistrationReject(const nas::RegistrationReject &msg)
...
@@ -565,7 +569,7 @@ void NasMm::receiveInitialRegistrationReject(const nas::RegistrationReject &msg)
{
{
Tai
tai
=
m_base
->
shCtx
.
getCurrentTai
();
Tai
tai
=
m_base
->
shCtx
.
getCurrentTai
();
if
(
tai
.
hasValue
())
if
(
tai
.
hasValue
())
m_storage
->
m_
forbiddenTaiListRoaming
->
add
(
tai
);
m_storage
->
forbiddenTaiListRoaming
->
add
(
tai
);
}
}
if
(
cause
==
nas
::
EMmCause
::
PLMN_NOT_ALLOWED
||
cause
==
nas
::
EMmCause
::
SERVING_NETWORK_NOT_AUTHORIZED
)
if
(
cause
==
nas
::
EMmCause
::
PLMN_NOT_ALLOWED
||
cause
==
nas
::
EMmCause
::
SERVING_NETWORK_NOT_AUTHORIZED
)
...
@@ -662,7 +666,7 @@ void NasMm::receiveMobilityRegistrationReject(const nas::RegistrationReject &msg
...
@@ -662,7 +666,7 @@ void NasMm::receiveMobilityRegistrationReject(const nas::RegistrationReject &msg
cause
==
nas
::
EMmCause
::
UE_IDENTITY_CANNOT_BE_DERIVED_FROM_NETWORK
)
cause
==
nas
::
EMmCause
::
UE_IDENTITY_CANNOT_BE_DERIVED_FROM_NETWORK
)
{
{
m_usim
->
m_storedGuti
=
{};
m_usim
->
m_storedGuti
=
{};
m_
usim
->
m_lastVisitedRegisteredTai
=
{}
;
m_
storage
->
lastVisitedRegisteredTai
->
clear
()
;
m_usim
->
m_taiList
=
{};
m_usim
->
m_taiList
=
{};
m_usim
->
m_currentNsCtx
=
{};
m_usim
->
m_currentNsCtx
=
{};
m_usim
->
m_nonCurrentNsCtx
=
{};
m_usim
->
m_nonCurrentNsCtx
=
{};
...
@@ -726,7 +730,7 @@ void NasMm::receiveMobilityRegistrationReject(const nas::RegistrationReject &msg
...
@@ -726,7 +730,7 @@ void NasMm::receiveMobilityRegistrationReject(const nas::RegistrationReject &msg
{
{
Tai
tai
=
m_base
->
shCtx
.
getCurrentTai
();
Tai
tai
=
m_base
->
shCtx
.
getCurrentTai
();
if
(
tai
.
hasValue
())
if
(
tai
.
hasValue
())
m_storage
->
m_
forbiddenTaiListRoaming
->
add
(
tai
);
m_storage
->
forbiddenTaiListRoaming
->
add
(
tai
);
}
}
if
(
cause
==
nas
::
EMmCause
::
PLMN_NOT_ALLOWED
||
cause
==
nas
::
EMmCause
::
SERVING_NETWORK_NOT_AUTHORIZED
)
if
(
cause
==
nas
::
EMmCause
::
PLMN_NOT_ALLOWED
||
cause
==
nas
::
EMmCause
::
SERVING_NETWORK_NOT_AUTHORIZED
)
...
@@ -803,7 +807,7 @@ void NasMm::handleAbnormalInitialRegFailure(nas::ERegistrationType regType)
...
@@ -803,7 +807,7 @@ void NasMm::handleAbnormalInitialRegFailure(nas::ERegistrationType regType)
// The UE shall delete 5G-GUTI, TAI list, last visited TAI, list of equivalent PLMNs and ngKSI, ..
// The UE shall delete 5G-GUTI, TAI list, last visited TAI, list of equivalent PLMNs and ngKSI, ..
m_usim
->
m_storedGuti
=
{};
m_usim
->
m_storedGuti
=
{};
m_usim
->
m_taiList
=
{};
m_usim
->
m_taiList
=
{};
m_
usim
->
m_lastVisitedRegisteredTai
=
{}
;
m_
storage
->
lastVisitedRegisteredTai
->
clear
()
;
m_usim
->
m_equivalentPlmnList
=
{};
m_usim
->
m_equivalentPlmnList
=
{};
m_usim
->
m_currentNsCtx
=
{};
m_usim
->
m_currentNsCtx
=
{};
m_usim
->
m_nonCurrentNsCtx
=
{};
m_usim
->
m_nonCurrentNsCtx
=
{};
...
...
src/ue/nas/mm/service.cpp
View file @
9be407e9
...
@@ -287,7 +287,7 @@ void NasMm::receiveServiceReject(const nas::ServiceReject &msg)
...
@@ -287,7 +287,7 @@ void NasMm::receiveServiceReject(const nas::ServiceReject &msg)
cause
==
nas
::
EMmCause
::
N1_MODE_NOT_ALLOWED
)
cause
==
nas
::
EMmCause
::
N1_MODE_NOT_ALLOWED
)
{
{
m_usim
->
m_storedGuti
=
{};
m_usim
->
m_storedGuti
=
{};
m_
usim
->
m_lastVisitedRegisteredTai
=
{}
;
m_
storage
->
lastVisitedRegisteredTai
->
clear
()
;
m_usim
->
m_taiList
=
{};
m_usim
->
m_taiList
=
{};
m_usim
->
m_currentNsCtx
=
{};
m_usim
->
m_currentNsCtx
=
{};
m_usim
->
m_nonCurrentNsCtx
=
{};
m_usim
->
m_nonCurrentNsCtx
=
{};
...
@@ -312,7 +312,7 @@ void NasMm::receiveServiceReject(const nas::ServiceReject &msg)
...
@@ -312,7 +312,7 @@ void NasMm::receiveServiceReject(const nas::ServiceReject &msg)
{
{
Tai
tai
=
m_base
->
shCtx
.
getCurrentTai
();
Tai
tai
=
m_base
->
shCtx
.
getCurrentTai
();
if
(
tai
.
hasValue
())
if
(
tai
.
hasValue
())
m_storage
->
m_
forbiddenTaiListRps
->
add
(
tai
);
m_storage
->
forbiddenTaiListRps
->
add
(
tai
);
}
}
if
(
cause
==
nas
::
EMmCause
::
ROAMING_NOT_ALLOWED_IN_TA
||
cause
==
nas
::
EMmCause
::
NO_SUITIBLE_CELLS_IN_TA
)
if
(
cause
==
nas
::
EMmCause
::
ROAMING_NOT_ALLOWED_IN_TA
||
cause
==
nas
::
EMmCause
::
NO_SUITIBLE_CELLS_IN_TA
)
...
@@ -320,7 +320,7 @@ void NasMm::receiveServiceReject(const nas::ServiceReject &msg)
...
@@ -320,7 +320,7 @@ void NasMm::receiveServiceReject(const nas::ServiceReject &msg)
Tai
tai
=
m_base
->
shCtx
.
getCurrentTai
();
Tai
tai
=
m_base
->
shCtx
.
getCurrentTai
();
if
(
tai
.
hasValue
())
if
(
tai
.
hasValue
())
{
{
m_storage
->
m_
forbiddenTaiListRoaming
->
add
(
tai
);
m_storage
->
forbiddenTaiListRoaming
->
add
(
tai
);
nas
::
utils
::
RemoveFromTaiList
(
m_usim
->
m_taiList
,
nas
::
VTrackingAreaIdentity
{
tai
});
nas
::
utils
::
RemoveFromTaiList
(
m_usim
->
m_taiList
,
nas
::
VTrackingAreaIdentity
{
tai
});
}
}
}
}
...
...
src/ue/nas/storage.cpp
View file @
9be407e9
...
@@ -25,17 +25,19 @@ namespace nr::ue
...
@@ -25,17 +25,19 @@ namespace nr::ue
MmStorage
::
MmStorage
(
TaskBase
*
base
)
:
m_base
{
base
}
MmStorage
::
MmStorage
(
TaskBase
*
base
)
:
m_base
{
base
}
{
{
m_
forbiddenTaiListRoaming
=
std
::
make_unique
<
nas
::
NasList
<
Tai
>>
(
forbiddenTaiListRoaming
=
std
::
make_unique
<
nas
::
NasList
<
Tai
>>
(
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
.
forbiddenTaiRoaming
);
BackupTaiListInSharedCtx
(
buffer
,
count
,
m_base
->
shCtx
.
forbiddenTaiRoaming
);
});
});
m_
forbiddenTaiListRps
=
std
::
make_unique
<
nas
::
NasList
<
Tai
>>
(
forbiddenTaiListRps
=
std
::
make_unique
<
nas
::
NasList
<
Tai
>>
(
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
);
serviceAreaList
=
std
::
make_unique
<
nas
::
NasSlot
<
nas
::
IEServiceAreaList
>>
(
0
,
std
::
nullopt
);
lastVisitedRegisteredTai
=
std
::
make_unique
<
nas
::
NasSlot
<
Tai
>>
(
0
,
std
::
nullopt
);
}
}
}
// namespace nr::ue
}
// namespace nr::ue
\ No newline at end of file
src/ue/nas/storage.hpp
View file @
9be407e9
...
@@ -19,9 +19,10 @@ class MmStorage
...
@@ -19,9 +19,10 @@ class MmStorage
TaskBase
*
m_base
;
TaskBase
*
m_base
;
public:
public:
std
::
unique_ptr
<
nas
::
NasList
<
Tai
>>
m_forbiddenTaiListRoaming
;
std
::
unique_ptr
<
nas
::
NasList
<
Tai
>>
forbiddenTaiListRoaming
;
std
::
unique_ptr
<
nas
::
NasList
<
Tai
>>
m_forbiddenTaiListRps
;
std
::
unique_ptr
<
nas
::
NasList
<
Tai
>>
forbiddenTaiListRps
;
std
::
unique_ptr
<
nas
::
NasSlot
<
nas
::
IEServiceAreaList
>>
m_serviceAreaList
;
std
::
unique_ptr
<
nas
::
NasSlot
<
nas
::
IEServiceAreaList
>>
serviceAreaList
;
std
::
unique_ptr
<
nas
::
NasSlot
<
Tai
>>
lastVisitedRegisteredTai
;
public:
public:
explicit
MmStorage
(
TaskBase
*
base
);
explicit
MmStorage
(
TaskBase
*
base
);
...
...
src/ue/nas/usim/usim.hpp
View file @
9be407e9
...
@@ -35,7 +35,6 @@ class Usim
...
@@ -35,7 +35,6 @@ class Usim
nas
::
IE5gsMobileIdentity
m_storedGuti
{};
nas
::
IE5gsMobileIdentity
m_storedGuti
{};
// Plmn related
// Plmn related
std
::
optional
<
nas
::
IE5gsTrackingAreaIdentity
>
m_lastVisitedRegisteredTai
{};
nas
::
IE5gsTrackingAreaIdentityList
m_taiList
{};
nas
::
IE5gsTrackingAreaIdentityList
m_taiList
{};
nas
::
IEPlmnList
m_equivalentPlmnList
{};
nas
::
IEPlmnList
m_equivalentPlmnList
{};
nas
::
IEPlmnList
m_forbiddenPlmnList
{};
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