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
19bd6bb4
Unverified
Commit
19bd6bb4
authored
Feb 28, 2021
by
Ali Güngör
Committed by
GitHub
Feb 28, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #263 from aligungr/dev
milenage.cpp compilation fix
parents
7949f681
159e260a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
146 additions
and
7 deletions
+146
-7
src/crypt/milenage.cpp
src/crypt/milenage.cpp
+1
-0
src/ue/mm/config.cpp
src/ue/mm/config.cpp
+138
-7
src/ue/nas/storage.hpp
src/ue/nas/storage.hpp
+7
-0
No files found.
src/crypt/milenage.cpp
View file @
19bd6bb4
...
...
@@ -8,6 +8,7 @@
#include "milenage.hpp"
#include <crypt-ext/milenage.hpp>
#include <stdexcept>
namespace
crypto
::
milenage
{
...
...
src/ue/mm/config.cpp
View file @
19bd6bb4
...
...
@@ -8,37 +8,168 @@
#include "mm.hpp"
#include <nas/utils.hpp>
namespace
nr
::
ue
{
void
NasMm
::
receiveConfigurationUpdate
(
const
nas
::
ConfigurationUpdateCommand
&
msg
)
{
// Indicates there exists at least one configuration to be updated
bool
hasNewConfig
=
false
;
// "Upon receiving the CONFIGURATION UPDATE COMMAND message, the UE shall stop timer T3346 if running"
m_timers
->
t3346
.
stop
();
// "If the UE receives a new 5G-GUTI in the CONFIGURATION UPDATE COMMAND message, the UE shall consider the new
// 5G-GUTI as valid, the old 5G-GUTI as invalid, stop timer T3519 if running, and delete any stored SUCI;"
if
(
msg
.
guti
.
has_value
()
&&
msg
.
guti
->
type
==
nas
::
EIdentityType
::
GUTI
)
{
hasNewConfig
=
true
;
m_storage
.
m_storedSuci
=
{};
m_storage
.
m_storedGuti
=
*
msg
.
guti
;
m_timers
->
t3519
.
stop
();
}
// "If the UE receives a new TAI list in the CONFIGURATION UPDATE COMMAND message, the UE shall consider the new TAI
// list as valid and the old TAI list as invalid; otherwise, the UE shall consider the old TAI list as valid."
if
(
msg
.
taiList
.
has_value
())
m_storage
.
m_taiList
=
msg
.
taiList
.
value
();
{
hasNewConfig
=
true
;
m_storage
.
m_taiList
=
*
msg
.
taiList
;
}
// "If the UE receives a new service area list in the CONFIGURATION UPDATE COMMAND message, the UE shall consider
// the
// new service area list as valid and the old service area list as invalid; otherwise, the UE shall consider the
// old service area list, if any, as valid."
if
(
msg
.
serviceAreaList
.
has_value
())
{
hasNewConfig
=
true
;
m_storage
.
m_serviceAreaList
=
*
msg
.
serviceAreaList
;
}
// "If the UE receives new NITZ information in the CONFIGURATION UPDATE COMMAND message, the UE considers the new
// NITZ information as valid and the old NITZ information as invalid; otherwise, the UE shall consider the old NITZ
// information as valid."
if
(
msg
.
networkFullName
.
has_value
())
{
hasNewConfig
=
true
;
m_storage
.
networkFullName
=
nas
::
utils
::
DeepCopyIe
(
*
msg
.
networkFullName
);
}
if
(
msg
.
networkShortName
.
has_value
())
{
hasNewConfig
=
true
;
m_storage
.
networkShortName
=
nas
::
utils
::
DeepCopyIe
(
*
msg
.
networkShortName
);
}
if
(
msg
.
localTimeZone
.
has_value
())
{
hasNewConfig
=
true
;
m_storage
.
localTimeZone
=
*
msg
.
localTimeZone
;
}
if
(
msg
.
universalTimeAndLocalTimeZone
.
has_value
())
{
hasNewConfig
=
true
;
m_storage
.
universalTimeAndLocalTimeZone
=
*
msg
.
universalTimeAndLocalTimeZone
;
}
if
(
msg
.
networkDaylightSavingTime
.
has_value
())
{
hasNewConfig
=
true
;
m_storage
.
networkDaylightSavingTime
=
*
msg
.
networkDaylightSavingTime
;
}
// "If the UE receives a new allowed NSSAI for the associated access type in the CONFIGURATION UPDATE COMMAND
// message, the UE shall consider the new allowed NSSAI as valid for the associated access type, store the allowed
// NSSAI for the associated access type as specified in subclause 4.6.2.2 and consider the old allowed NSSAI for
// the associated access type as invalid; otherwise, the UE shall consider the old Allowed NSSAI as valid for the
// associated access type."
if
(
msg
.
allowedNssai
.
has_value
())
{
hasNewConfig
=
true
;
m_storage
.
m_allowedNssai
=
nas
::
utils
::
NssaiTo
(
*
msg
.
allowedNssai
);
}
// "If the UE receives a new configured NSSAI in the CONFIGURATION UPDATE COMMAND message, the UE shall consider the
// new configured NSSAI for the registered PLMN as valid and the old configured NSSAI for the registered PLMN as
// invalid; otherwise, the UE shall consider the old configured NSSAI for the registered PLMN as valid The UE shall
// store the new configured NSSAI as specified in subclause 4.6.2.2."
if
(
msg
.
configuredNssai
.
has_value
())
{
hasNewConfig
=
true
;
m_storage
.
m_configuredNssai
=
nas
::
utils
::
NssaiTo
(
*
msg
.
configuredNssai
);
}
// "If the UE receives the Network slicing indication IE in the CONFIGURATION UPDATE COMMAND message with the
// Network slicing subscription change indication set to "Network slicing subscription changed", the UE shall
// delete the network slicing information for each and every PLMN except for the current PLMN as specified in
// subclause 4.6.2.2."
if
(
msg
.
networkSlicingIndication
.
has_value
()
&&
msg
.
networkSlicingIndication
->
nssci
==
nas
::
ENetworkSlicingSubscriptionChangeIndication
::
CHANGED
)
{
hasNewConfig
=
true
;
handleNetworkSlicingSubscriptionChange
();
}
// "The UE receiving the rejected NSSAI in the CONFIGURATION UPDATE COMMAND message takes the following actions
// based on the rejection cause in the rejected NSSAI: .."
if
(
msg
.
rejectedNssai
.
has_value
())
{
hasNewConfig
=
true
;
for
(
auto
&
rejectedSlice
:
msg
.
rejectedNssai
->
list
)
{
SingleSlice
slice
{};
slice
.
sst
=
rejectedSlice
.
sst
;
slice
.
sd
=
rejectedSlice
.
sd
;
if
(
msg
.
configurationUpdateIndication
.
has_value
())
auto
&
list
=
rejectedSlice
.
cause
==
nas
::
ERejectedSNssaiCause
::
NA_IN_PLMN
?
m_storage
.
m_rejectedNssaiInPlmn
:
m_storage
.
m_rejectedNssaiInTa
;
list
.
addIfNotExists
(
slice
);
}
}
// "If the CONFIGURATION UPDATE COMMAND message indicates "registration requested" in the Configuration update
// indication IE and:"
if
(
msg
.
configurationUpdateIndication
.
has_value
()
&&
msg
.
configurationUpdateIndication
->
red
==
nas
::
ERegistrationRequested
::
REQUESTED
)
{
if
(
msg
.
configurationUpdateIndication
.
has_value
())
// "contains no other parameters or contains at least one of the following parameters: a new allowed NSSAI,
// a new configured NSSAI or the Network slicing subscription change indication, and:"
if
(
!
hasNewConfig
||
(
msg
.
allowedNssai
.
has_value
()
||
msg
.
configuredNssai
.
has_value
()
||
msg
.
networkSlicingIndication
.
has_value
()))
{
if
(
msg
.
configurationUpdateIndication
->
red
==
nas
::
ERegistrationRequested
::
REQUESTED
)
if
(
hasEmergency
())
// "an emergency PDU session exists,"
{
// "the UE shall, after the completion of the generic UE configuration
// update procedure and after the emergency PDU session is released, release the existing N1 NAS
// signalling connection, and start a registration procedure for mobility and periodic registration
// update as specified in subclause 5.5.1.3;"
// TODO
}
if
(
msg
.
configurationUpdateIndication
->
ack
==
nas
::
EAcknowledgement
::
REQUESTED
)
else
// "no emergency PDU Session exists,"
{
nas
::
ConfigurationUpdateComplete
resp
;
sendNasMessage
(
resp
);
// "the UE shall, after the completion of the generic UE configuration
// update procedure, and the release of the existing N1 NAS signalling connection, start a registration
// procedure for mobility and periodic registration update as specified in subclause 5.5.1.3;"
// TODO
}
}
if
(
msg
.
micoIndication
.
has_value
()
&&
!
msg
.
allowedNssai
.
has_value
()
&&
!
msg
.
configuredNssai
.
has_value
())
{
// "an MICO indication is included without a new allowed NSSAI or a new configured NSSAI, the UE shall,
// after the completion of the generic UE configuration update procedure, start a registration procedure
// for mobility and registration update as specified in subclause 5.5.1.3 to re-negotiate MICO mode with
// the network."
// TODO
}
}
// "If acknowledgement requested is indicated in the Configuration update indication IE in the CONFIGURATION UPDATE
// COMMAND message, the UE shall send a CONFIGURATION UPDATE COMPLETE message."
if
(
msg
.
configurationUpdateIndication
.
has_value
()
&&
msg
.
configurationUpdateIndication
->
ack
==
nas
::
EAcknowledgement
::
REQUESTED
)
{
sendNasMessage
(
nas
::
ConfigurationUpdateComplete
{});
}
}
...
...
src/ue/nas/storage.hpp
View file @
19bd6bb4
...
...
@@ -48,6 +48,13 @@ class MobileStorage
NetworkSlice
m_rejectedNssaiInPlmn
{};
NetworkSlice
m_rejectedNssaiInTa
{};
// NITZ related
std
::
optional
<
nas
::
IENetworkName
>
networkFullName
{};
std
::
optional
<
nas
::
IENetworkName
>
networkShortName
{};
std
::
optional
<
nas
::
IETimeZone
>
localTimeZone
{};
std
::
optional
<
nas
::
IETimeZoneAndTime
>
universalTimeAndLocalTimeZone
{};
std
::
optional
<
nas
::
IEDaylightSavingTime
>
networkDaylightSavingTime
{};
public:
void
initialize
(
bool
hasSupi
,
const
UeConfig
::
Initials
&
initials
)
{
...
...
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