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
4e71068d
Commit
4e71068d
authored
Mar 21, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PDU session establishment accept improvement
parent
d8f12f66
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
5 deletions
+23
-5
src/nas/encode.cpp
src/nas/encode.cpp
+1
-1
src/nas/msg.hpp
src/nas/msg.hpp
+2
-2
src/ue/sm/establishment.cpp
src/ue/sm/establishment.cpp
+20
-2
No files found.
src/nas/encode.cpp
View file @
4e71068d
...
...
@@ -369,7 +369,7 @@ std::unique_ptr<NasMessage> DecodeNasMessage(const OctetView &stream)
}
else
{
auto
pduSessionId
=
st
atic_cast
<
EPduSessionIdentity
>
(
stream
.
readI
()
);
auto
pduSessionId
=
st
ream
.
readI
(
);
uint8_t
pti
=
stream
.
read
();
auto
messageType
=
static_cast
<
EMessageType
>
(
stream
.
readI
());
...
...
src/nas/msg.hpp
View file @
4e71068d
...
...
@@ -87,8 +87,8 @@ struct NasMessage
struct
SmMessage
:
NasMessage
{
EPduSessionIdentity
pduSessionId
{};
uint8_
t
pti
{};
int
pduSessionId
{};
in
t
pti
{};
EMessageType
messageType
{};
protected:
...
...
src/ue/sm/establishment.cpp
View file @
4e71068d
...
...
@@ -105,7 +105,7 @@ void NasSm::sendEstablishmentRequest(const SessionConfig &config)
/* Prepare the establishment request message */
auto
req
=
std
::
make_unique
<
nas
::
PduSessionEstablishmentRequest
>
();
req
->
pti
=
pti
;
req
->
pduSessionId
=
static_cast
<
nas
::
EPduSessionIdentity
>
(
psi
)
;
req
->
pduSessionId
=
psi
;
req
->
integrityProtectionMaximumDataRate
=
MakeIntegrityMaxRate
(
m_base
->
config
->
integrityMaxRate
);
req
->
pduSessionType
=
nas
::
IEPduSessionType
{};
req
->
pduSessionType
->
pduSessionType
=
nas
::
EPduSessionType
::
IPV4
;
...
...
@@ -127,15 +127,33 @@ void NasSm::sendEstablishmentRequest(const SessionConfig &config)
void
NasSm
::
receivePduSessionEstablishmentAccept
(
const
nas
::
PduSessionEstablishmentAccept
&
msg
)
{
m_logger
->
debug
(
"PDU Session Establishment Accept received"
);
if
(
msg
.
smCause
.
has_value
())
{
m_logger
->
warn
(
"SM cause received in PduSessionEstablishmentAccept [%s]"
,
nas
::
utils
::
EnumToString
(
msg
.
smCause
->
value
));
}
if
(
msg
.
pti
<
ProcedureTransaction
::
MIN_ID
||
msg
.
pti
>
ProcedureTransaction
::
MAX_ID
)
{
// PTI is required for PDU session establishment request
m_logger
->
err
(
"Received PTI [%d] value is invalid"
,
msg
.
pti
);
sendSmCause
(
nas
::
ESmCause
::
INVALID_PTI_VALUE
,
msg
.
pduSessionId
);
return
;
}
if
(
m_procedureTransactions
[
msg
.
pti
].
psi
!=
msg
.
pduSessionId
)
{
m_logger
->
err
(
"Received PSI value [%d] is invalid, expected was [%d]"
,
msg
.
pduSessionId
,
m_procedureTransactions
[
msg
.
pti
].
psi
);
sendSmCause
(
nas
::
ESmCause
::
INVALID_PTI_VALUE
,
msg
.
pduSessionId
);
return
;
}
freeProcedureTransactionId
(
msg
.
pti
);
auto
pduSession
=
m_pduSessions
[
static_cast
<
int
>
(
msg
.
pduSessionId
)
];
auto
&
pduSession
=
m_pduSessions
[
msg
.
pduSessionId
];
if
(
pduSession
->
psState
!=
EPsState
::
ACTIVE_PENDING
)
{
m_logger
->
err
(
"PS establishment accept received without requested"
);
...
...
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