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
68e8d896
Commit
68e8d896
authored
Apr 04, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Service accept handling
parent
52b78fe2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
2 deletions
+45
-2
src/ue/nas/mm/service.cpp
src/ue/nas/mm/service.cpp
+45
-2
No files found.
src/ue/nas/mm/service.cpp
View file @
68e8d896
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
//
//
#include "mm.hpp"
#include "mm.hpp"
#include <nas/utils.hpp>
#include <ue/nas/sm/sm.hpp>
#include <ue/nas/sm/sm.hpp>
namespace
nr
::
ue
namespace
nr
::
ue
...
@@ -112,6 +113,50 @@ void NasMm::sendServiceRequest(EServiceReqCause reqCause)
...
@@ -112,6 +113,50 @@ void NasMm::sendServiceRequest(EServiceReqCause reqCause)
void
NasMm
::
receiveServiceAccept
(
const
nas
::
ServiceAccept
&
msg
)
void
NasMm
::
receiveServiceAccept
(
const
nas
::
ServiceAccept
&
msg
)
{
{
if
(
m_mmState
!=
EMmState
::
MM_SERVICE_REQUEST_INITIATED
)
{
m_logger
->
warn
(
"Service Accept ignored since the MM state is not MM_SERVICE_REQUEST_INITIATED"
);
sendMmStatus
(
nas
::
EMmCause
::
MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE
);
return
;
}
if
(
m_lastServiceReqCause
!=
EServiceReqCause
::
EMERGENCY_FALLBACK
)
{
m_logger
->
info
(
"Service Accept received"
);
m_serCounter
=
0
;
m_timers
->
t3517
.
stop
();
switchMmState
(
EMmState
::
MM_REGISTERED
,
EMmSubState
::
MM_REGISTERED_NA
);
}
else
{
// todo: emergency fallback
}
// Handle PDU session status
if
(
msg
.
pduSessionStatus
.
has_value
())
{
auto
statusInUe
=
m_sm
->
getPduSessionStatus
();
auto
statusInNw
=
msg
.
pduSessionStatus
->
psi
;
for
(
int
i
=
1
;
i
<
16
;
i
++
)
if
(
statusInUe
[
i
]
&&
!
statusInNw
[
i
])
m_sm
->
localReleaseSession
(
i
);
}
// Handle PDU session reactivation result
if
(
msg
.
pduSessionReactivationResult
.
has_value
())
{
// todo: not handled since non-3gpp access is not supported
}
// Handle PDU session reactivation result error cause
if
(
msg
.
pduSessionReactivationResultErrorCause
.
has_value
())
{
for
(
auto
&
item
:
msg
.
pduSessionReactivationResultErrorCause
->
values
)
m_logger
->
err
(
"PDU session reactivation result error PSI[%d] cause[%s]"
,
item
.
pduSessionId
,
nas
::
utils
::
EnumToString
(
item
.
causeValue
));
}
// Handle EAP message
if
(
msg
.
eapMessage
.
has_value
())
if
(
msg
.
eapMessage
.
has_value
())
{
{
if
(
msg
.
eapMessage
->
eap
->
code
==
eap
::
ECode
::
FAILURE
)
if
(
msg
.
eapMessage
->
eap
->
code
==
eap
::
ECode
::
FAILURE
)
...
@@ -119,8 +164,6 @@ void NasMm::receiveServiceAccept(const nas::ServiceAccept &msg)
...
@@ -119,8 +164,6 @@ void NasMm::receiveServiceAccept(const nas::ServiceAccept &msg)
else
else
m_logger
->
warn
(
"Network sent EAP with inconvenient type in ServiceAccept, ignoring EAP IE."
);
m_logger
->
warn
(
"Network sent EAP with inconvenient type in ServiceAccept, ignoring EAP IE."
);
}
}
// TODO
}
}
void
NasMm
::
receiveServiceReject
(
const
nas
::
ServiceReject
&
msg
)
void
NasMm
::
receiveServiceReject
(
const
nas
::
ServiceReject
&
msg
)
...
...
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