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
f1ee3190
Commit
f1ee3190
authored
Jun 06, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UAC Access identity determination
parent
22416f85
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
97 additions
and
4 deletions
+97
-4
src/ue/nas/mm/access.cpp
src/ue/nas/mm/access.cpp
+53
-0
src/ue/nas/mm/mm.hpp
src/ue/nas/mm/mm.hpp
+2
-1
src/ue/nas/mm/register.cpp
src/ue/nas/mm/register.cpp
+42
-3
No files found.
src/ue/nas/mm/access.cpp
View file @
f1ee3190
...
@@ -73,4 +73,57 @@ bool NasMm::isInNonAllowedArea()
...
@@ -73,4 +73,57 @@ bool NasMm::isInNonAllowedArea()
return
false
;
return
false
;
}
}
std
::
bitset
<
16
>
NasMm
::
determineAccessIdentities
()
{
std
::
bitset
<
16
>
ais
;
auto
currentPlmn
=
m_base
->
shCtx
.
getCurrentPlmn
();
if
(
m_base
->
config
->
uacAic
.
mps
&&
m_rmState
==
ERmState
::
RM_REGISTERED
&&
currentPlmn
.
hasValue
())
{
if
(
currentPlmn
==
m_base
->
config
->
hplmn
||
m_storage
->
equivalentPlmnList
->
contains
(
currentPlmn
)
||
currentPlmn
.
mcc
==
m_base
->
config
->
hplmn
.
mcc
)
{
ais
[
1
]
=
true
;
}
}
if
(
m_base
->
config
->
uacAic
.
mcs
&&
m_rmState
==
ERmState
::
RM_REGISTERED
&&
currentPlmn
.
hasValue
())
{
if
(
currentPlmn
==
m_base
->
config
->
hplmn
||
m_storage
->
equivalentPlmnList
->
contains
(
currentPlmn
)
||
currentPlmn
.
mcc
==
m_base
->
config
->
hplmn
.
mcc
)
{
ais
[
2
]
=
true
;
}
}
if
(
m_nwFeatureSupport
)
{
if
(
m_nwFeatureSupport
->
mpsi
==
nas
::
EMpsIndicator
::
SUPPORTED
)
ais
[
1
]
=
true
;
if
(
m_nwFeatureSupport
->
mcsi
&&
m_nwFeatureSupport
->
mcsi
==
nas
::
EMcsIndicator
::
VALID
)
ais
[
2
]
=
true
;
}
if
(
currentPlmn
.
hasValue
()
&&
(
currentPlmn
==
m_base
->
config
->
hplmn
||
m_storage
->
equivalentPlmnList
->
contains
(
currentPlmn
)))
{
ais
[
11
]
=
true
;
ais
[
15
]
=
true
;
}
if
(
currentPlmn
.
hasValue
()
&&
(
currentPlmn
==
m_base
->
config
->
hplmn
||
currentPlmn
.
mcc
==
m_base
->
config
->
hplmn
.
mcc
))
{
ais
[
12
]
=
true
;
ais
[
13
]
=
true
;
ais
[
14
]
=
true
;
}
if
(
ais
.
none
())
ais
[
0
]
=
true
;
return
ais
;
}
}
// namespace nr::ue
}
// namespace nr::ue
src/ue/nas/mm/mm.hpp
View file @
f1ee3190
...
@@ -58,7 +58,7 @@ class NasMm
...
@@ -58,7 +58,7 @@ class NasMm
// Indicates registered for emergency services (Only meaningful in RM-REGISTERED state, or implies the last one)
// Indicates registered for emergency services (Only meaningful in RM-REGISTERED state, or implies the last one)
bool
m_registeredForEmergency
{};
bool
m_registeredForEmergency
{};
// Network feature support information
// Network feature support information
nas
::
IE5gsNetworkFeatureSupport
m_nwFeatureSupport
{};
std
::
optional
<
nas
::
IE5gsNetworkFeatureSupport
>
m_nwFeatureSupport
{};
// Number of times the network failing the authentication check
// Number of times the network failing the authentication check
int
m_nwConsecutiveAuthFailure
{};
int
m_nwConsecutiveAuthFailure
{};
// Last time PLMN search failure logged
// Last time PLMN search failure logged
...
@@ -174,6 +174,7 @@ class NasMm
...
@@ -174,6 +174,7 @@ class NasMm
bool
hasEmergency
();
bool
hasEmergency
();
void
setN1Capability
(
bool
enabled
);
void
setN1Capability
(
bool
enabled
);
bool
isInNonAllowedArea
();
bool
isInNonAllowedArea
();
std
::
bitset
<
16
>
determineAccessIdentities
();
private:
/* eCall */
private:
/* eCall */
bool
startECallInactivityIfNeeded
();
bool
startECallInactivityIfNeeded
();
...
...
src/ue/nas/mm/register.cpp
View file @
f1ee3190
...
@@ -381,7 +381,27 @@ void NasMm::receiveInitialRegistrationAccept(const nas::RegistrationAccept &msg)
...
@@ -381,7 +381,27 @@ void NasMm::receiveInitialRegistrationAccept(const nas::RegistrationAccept &msg)
}
}
// Store the network feature support
// Store the network feature support
m_nwFeatureSupport
=
msg
.
networkFeatureSupport
.
value_or
(
nas
::
IE5gsNetworkFeatureSupport
{});
if
(
msg
.
networkFeatureSupport
)
{
if
(
m_nwFeatureSupport
)
{
m_nwFeatureSupport
->
imsVoPs3gpp
=
msg
.
networkFeatureSupport
->
imsVoPs3gpp
;
m_nwFeatureSupport
->
imsVoPsN3gpp
=
msg
.
networkFeatureSupport
->
imsVoPsN3gpp
;
m_nwFeatureSupport
->
emc
=
msg
.
networkFeatureSupport
->
emc
;
m_nwFeatureSupport
->
emf
=
msg
.
networkFeatureSupport
->
emf
;
m_nwFeatureSupport
->
iwkN26
=
msg
.
networkFeatureSupport
->
iwkN26
;
m_nwFeatureSupport
->
mpsi
=
msg
.
networkFeatureSupport
->
mpsi
;
if
(
msg
.
networkFeatureSupport
->
emcn3
)
m_nwFeatureSupport
->
emcn3
=
msg
.
networkFeatureSupport
->
emcn3
;
if
(
msg
.
networkFeatureSupport
->
mcsi
)
m_nwFeatureSupport
->
mcsi
=
msg
.
networkFeatureSupport
->
mcsi
;
}
else
{
m_nwFeatureSupport
=
msg
.
networkFeatureSupport
;
}
}
if
(
sendComplete
)
if
(
sendComplete
)
{
{
...
@@ -509,8 +529,27 @@ void NasMm::receiveMobilityRegistrationAccept(const nas::RegistrationAccept &msg
...
@@ -509,8 +529,27 @@ void NasMm::receiveMobilityRegistrationAccept(const nas::RegistrationAccept &msg
}
}
// Store the network feature support
// Store the network feature support
if
(
msg
.
networkFeatureSupport
.
has_value
())
if
(
msg
.
networkFeatureSupport
)
m_nwFeatureSupport
=
*
msg
.
networkFeatureSupport
;
{
if
(
m_nwFeatureSupport
)
{
m_nwFeatureSupport
->
imsVoPs3gpp
=
msg
.
networkFeatureSupport
->
imsVoPs3gpp
;
m_nwFeatureSupport
->
imsVoPsN3gpp
=
msg
.
networkFeatureSupport
->
imsVoPsN3gpp
;
m_nwFeatureSupport
->
emc
=
msg
.
networkFeatureSupport
->
emc
;
m_nwFeatureSupport
->
emf
=
msg
.
networkFeatureSupport
->
emf
;
m_nwFeatureSupport
->
iwkN26
=
msg
.
networkFeatureSupport
->
iwkN26
;
m_nwFeatureSupport
->
mpsi
=
msg
.
networkFeatureSupport
->
mpsi
;
if
(
msg
.
networkFeatureSupport
->
emcn3
)
m_nwFeatureSupport
->
emcn3
=
msg
.
networkFeatureSupport
->
emcn3
;
if
(
msg
.
networkFeatureSupport
->
mcsi
)
m_nwFeatureSupport
->
mcsi
=
msg
.
networkFeatureSupport
->
mcsi
;
}
else
{
m_nwFeatureSupport
=
msg
.
networkFeatureSupport
;
}
}
// The service request attempt counter shall be reset when registration procedure for mobility and periodic
// The service request attempt counter shall be reset when registration procedure for mobility and periodic
// registration update is successfully completed
// registration update is successfully completed
...
...
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