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
ce6ff2e4
Commit
ce6ff2e4
authored
May 23, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
L3 RRC/NAS developments
parent
c2dbba5d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
17 deletions
+48
-17
src/ue/nas/mm/dereg.cpp
src/ue/nas/mm/dereg.cpp
+4
-1
src/ue/nas/mm/mm.hpp
src/ue/nas/mm/mm.hpp
+1
-1
src/ue/nas/mm/proc.cpp
src/ue/nas/mm/proc.cpp
+25
-4
src/ue/nas/mm/register.cpp
src/ue/nas/mm/register.cpp
+18
-11
No files found.
src/ue/nas/mm/dereg.cpp
View file @
ce6ff2e4
...
...
@@ -34,6 +34,9 @@ EProcRc NasMm::sendDeregistration(EDeregCause deregCause)
return
EProcRc
::
CANCEL
;
}
if
(
m_mmState
==
EMmState
::
MM_DEREGISTERED_INITIATED
)
return
EProcRc
::
CANCEL
;
m_logger
->
debug
(
"Starting de-registration procedure due to [%s]"
,
ToJson
(
deregCause
).
str
().
c_str
());
updateProvidedGuti
();
...
...
@@ -56,7 +59,7 @@ EProcRc NasMm::sendDeregistration(EDeregCause deregCause)
auto
rc
=
sendNasMessage
(
*
request
);
if
(
rc
!=
EProcRc
::
OK
)
return
EProcRc
::
STAY
;
return
rc
;
m_lastDeregistrationRequest
=
std
::
move
(
request
);
m_lastDeregCause
=
deregCause
;
...
...
src/ue/nas/mm/mm.hpp
View file @
ce6ff2e4
...
...
@@ -105,7 +105,7 @@ class NasMm
private:
/* Registration */
void
sendMobilityRegistration
(
ERegUpdateCause
updateCause
);
void
sendInitialRegistration
(
EInitialRegCause
regCause
);
EProcRc
sendInitialRegistration
(
EInitialRegCause
regCause
);
void
receiveRegistrationAccept
(
const
nas
::
RegistrationAccept
&
msg
);
void
receiveInitialRegistrationAccept
(
const
nas
::
RegistrationAccept
&
msg
);
void
receiveMobilityRegistrationAccept
(
const
nas
::
RegistrationAccept
&
msg
);
...
...
src/ue/nas/mm/proc.cpp
View file @
ce6ff2e4
...
...
@@ -105,12 +105,33 @@ void NasMm::invokeProcedures()
if
(
m_procCtl
.
deregistration
)
{
EProcRc
rc
=
sendDeregistration
(
*
m_procCtl
.
deregistration
);
if
(
rc
!=
EProcRc
::
STAY
)
if
(
rc
==
EProcRc
::
OK
)
{
m_procCtl
.
deregistration
=
std
::
nullopt
;
m_procCtl
.
initialRegistration
=
std
::
nullopt
;
m_procCtl
.
mobilityRegistration
=
std
::
nullopt
;
m_procCtl
.
serviceRequest
=
std
::
nullopt
;
}
else
if
(
rc
==
EProcRc
::
CANCEL
)
{
m_procCtl
.
deregistration
=
std
::
nullopt
;
}
return
;
}
m_procCtl
.
initialRegistration
=
std
::
nullopt
;
m_procCtl
.
mobilityRegistration
=
std
::
nullopt
;
m_procCtl
.
serviceRequest
=
std
::
nullopt
;
if
(
m_procCtl
.
initialRegistration
)
{
EProcRc
rc
=
sendInitialRegistration
(
*
m_procCtl
.
initialRegistration
);
if
(
rc
==
EProcRc
::
OK
)
{
m_procCtl
.
initialRegistration
=
std
::
nullopt
;
m_procCtl
.
mobilityRegistration
=
std
::
nullopt
;
m_procCtl
.
serviceRequest
=
std
::
nullopt
;
}
else
if
(
rc
==
EProcRc
::
CANCEL
)
{
m_procCtl
.
initialRegistration
=
std
::
nullopt
;
}
return
;
}
...
...
src/ue/nas/mm/register.cpp
View file @
ce6ff2e4
...
...
@@ -15,14 +15,17 @@
namespace
nr
::
ue
{
void
NasMm
::
sendInitialRegistration
(
EInitialRegCause
regCause
)
EProcRc
NasMm
::
sendInitialRegistration
(
EInitialRegCause
regCause
)
{
if
(
m_rmState
!=
ERmState
::
RM_DEREGISTERED
)
{
m_logger
->
warn
(
"Registration could not be triggered. UE is not in RM-DEREGISTERED state."
);
return
;
return
EProcRc
::
CANCEL
;
}
if
(
m_mmState
==
EMmState
::
MM_DEREGISTERED_INITIATED
)
return
EProcRc
::
STAY
;
bool
isEmergencyReg
=
regCause
==
EInitialRegCause
::
EMERGENCY_SERVICES
;
// 5.5.1.2.7 Abnormal cases in the UE
...
...
@@ -37,7 +40,7 @@ void NasMm::sendInitialRegistration(EInitialRegCause regCause)
if
(
!
highPriority
&&
regCause
!=
EInitialRegCause
::
DUE_TO_DEREGISTRATION
)
{
m_logger
->
debug
(
"Initial registration canceled, T3346 is running"
);
return
;
return
EProcRc
::
STAY
;
}
}
...
...
@@ -51,9 +54,6 @@ void NasMm::sendInitialRegistration(EInitialRegCause regCause)
// initiates an initial registration procedure
m_usim
->
m_currentNsCtx
=
{};
// Switch MM state
switchMmState
(
EMmSubState
::
MM_REGISTERED_INITIATED_PS
);
// Prepare requested NSSAI
bool
isDefaultNssai
{};
auto
requestedNssai
=
makeRequestedNssai
(
isDefaultNssai
);
...
...
@@ -97,7 +97,13 @@ void NasMm::sendInitialRegistration(EInitialRegCause regCause)
}
// Send the message
sendNasMessage
(
*
request
);
auto
rc
=
sendNasMessage
(
*
request
);
if
(
rc
!=
EProcRc
::
OK
)
return
rc
;
// Switch MM state
switchMmState
(
EMmSubState
::
MM_REGISTERED_INITIATED_PS
);
m_lastRegistrationRequest
=
std
::
move
(
request
);
m_lastRegWithoutNsc
=
m_usim
->
m_currentNsCtx
==
nullptr
;
...
...
@@ -105,6 +111,8 @@ void NasMm::sendInitialRegistration(EInitialRegCause regCause)
m_timers
->
t3510
.
start
();
m_timers
->
t3502
.
stop
();
m_timers
->
t3511
.
stop
();
return
EProcRc
::
OK
;
}
void
NasMm
::
sendMobilityRegistration
(
ERegUpdateCause
updateCause
)
...
...
@@ -625,7 +633,7 @@ void NasMm::receiveInitialRegistrationReject(const nas::RegistrationReject &msg)
{
m_storage
->
forbiddenTaiListRoaming
->
add
(
tai
);
m_storage
->
serviceAreaList
->
mutate
([
&
tai
](
auto
&
value
)
{
nas
::
utils
::
RemoveFromServiceAreaList
(
value
,
nas
::
VTrackingAreaIdentity
{
tai
});
nas
::
utils
::
RemoveFromServiceAreaList
(
value
,
nas
::
VTrackingAreaIdentity
{
tai
});
});
}
}
...
...
@@ -791,9 +799,8 @@ void NasMm::receiveMobilityRegistrationReject(const nas::RegistrationReject &msg
if
(
tai
.
hasValue
())
{
m_storage
->
forbiddenTaiListRoaming
->
add
(
tai
);
m_storage
->
serviceAreaList
->
mutate
([
&
tai
](
auto
&
value
)
{
nas
::
utils
::
RemoveFromServiceAreaList
(
value
,
nas
::
VTrackingAreaIdentity
{
tai
});
});
m_storage
->
serviceAreaList
->
mutate
(
[
&
tai
](
auto
&
value
)
{
nas
::
utils
::
RemoveFromServiceAreaList
(
value
,
nas
::
VTrackingAreaIdentity
{
tai
});
});
}
}
...
...
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