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
4146a48a
Commit
4146a48a
authored
Dec 24, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NTS memory leak fix
parent
4ec4a785
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
21 deletions
+18
-21
src/gnb/gtp/proto.cpp
src/gnb/gtp/proto.cpp
+2
-2
src/gnb/gtp/proto.hpp
src/gnb/gtp/proto.hpp
+15
-14
src/gnb/gtp/task.cpp
src/gnb/gtp/task.cpp
+1
-5
No files found.
src/gnb/gtp/proto.cpp
View file @
4146a48a
...
...
@@ -153,9 +153,9 @@ static PdcpPduNumberExtHeader *DecodePdcpPduNumberExtHeader(int len, const Octet
return
res
;
}
GtpMessage
*
DecodeGtpMessage
(
const
OctetView
&
stream
)
std
::
unique_ptr
<
GtpMessage
>
DecodeGtpMessage
(
const
OctetView
&
stream
)
{
auto
*
res
=
new
GtpMessage
();
auto
res
=
std
::
make_unique
<
GtpMessage
>
();
size_t
fistIndex
=
stream
.
currentIndex
();
...
...
src/gnb/gtp/proto.hpp
View file @
4146a48a
...
...
@@ -39,12 +39,12 @@ struct PduSessionInformation
struct
DlPduSessionInformation
:
PduSessionInformation
{
bool
qmp
{};
// (Mandatory) QoS Monitoring Packet, See 5.5.3.8
int
qfi
{};
// (Mandatory) 6-bit, QOS Flow Identifier, See 5.5.3.3
bool
rqi
{};
// (Mandatory) Reflective QOS Indicator, See 5.5.3.4
std
::
optional
<
int
>
ppi
{};
// (Optional, may be null) Paging Policy Indicator, See 5.5.3.7
bool
qmp
{};
// (Mandatory) QoS Monitoring Packet, See 5.5.3.8
int
qfi
{};
// (Mandatory) 6-bit, QOS Flow Identifier, See 5.5.3.3
bool
rqi
{};
// (Mandatory) Reflective QOS Indicator, See 5.5.3.4
std
::
optional
<
int
>
ppi
{};
// (Optional, may be null) Paging Policy Indicator, See 5.5.3.7
std
::
optional
<
int64_t
>
dlSendingTs
{};
// (Optional, may be null) DL Sending Time Stamp, See 5.5.3.9
std
::
optional
<
int
>
dlQfiSeq
{};
// (Optional, may be null) 3-octet, DL QFI Sequence Number, See 5.5.3.18
std
::
optional
<
int
>
dlQfiSeq
{};
// (Optional, may be null) 3-octet, DL QFI Sequence Number, See 5.5.3.18
DlPduSessionInformation
()
:
PduSessionInformation
(
PDU_TYPE_DL
)
{
...
...
@@ -55,14 +55,15 @@ struct DlPduSessionInformation : PduSessionInformation
struct
UlPduSessionInformation
:
PduSessionInformation
{
bool
qmp
{};
// (Mandatory) QoS Monitoring Packet, See 5.5.3.8
int
qfi
{};
// (Mandatory) 6-bit, QOS Flow Identifier, See 5.5.3.3
std
::
optional
<
int64_t
>
dlSendingTsRepeated
{};
// (Optional, may be null) DL Sending Time Stamp Repeated, See 5.5.3.10
std
::
optional
<
int64_t
>
dlReceivedTs
{};
// (Optional, may be null) DL Received Time Stamp, See 5.5.3.11
std
::
optional
<
int64_t
>
ulSendingTs
{};
// (Optional, may be null) UL Sending Time Stamp, See 5.5.3.12
std
::
optional
<
uint32_t
>
dlDelayResult
{};
// (Optional, may be null) DL Delay Result, See 5.5.3.14
std
::
optional
<
uint32_t
>
ulDelayResult
{};
// (Optional, may be null) UL Delay Result, See 5.5.3.16
std
::
optional
<
int
>
ulQfiSeq
{};
// (Optional, may be null) 3-octet, UL QFI Sequence Number, See 5.5.3.19
bool
qmp
{};
// (Mandatory) QoS Monitoring Packet, See 5.5.3.8
int
qfi
{};
// (Mandatory) 6-bit, QOS Flow Identifier, See 5.5.3.3
std
::
optional
<
int64_t
>
dlSendingTsRepeated
{};
// (Optional, may be null) DL Sending Time Stamp Repeated, See 5.5.3.10
std
::
optional
<
int64_t
>
dlReceivedTs
{};
// (Optional, may be null) DL Received Time Stamp, See 5.5.3.11
std
::
optional
<
int64_t
>
ulSendingTs
{};
// (Optional, may be null) UL Sending Time Stamp, See 5.5.3.12
std
::
optional
<
uint32_t
>
dlDelayResult
{};
// (Optional, may be null) DL Delay Result, See 5.5.3.14
std
::
optional
<
uint32_t
>
ulDelayResult
{};
// (Optional, may be null) UL Delay Result, See 5.5.3.16
std
::
optional
<
int
>
ulQfiSeq
{};
// (Optional, may be null) 3-octet, UL QFI Sequence Number, See 5.5.3.19
UlPduSessionInformation
()
:
PduSessionInformation
(
PDU_TYPE_UL
)
{
...
...
@@ -151,6 +152,6 @@ struct GtpMessage
};
bool
EncodeGtpMessage
(
const
GtpMessage
&
msg
,
OctetString
&
stream
);
GtpMessage
*
DecodeGtpMessage
(
const
OctetView
&
stream
);
std
::
unique_ptr
<
GtpMessage
>
DecodeGtpMessage
(
const
OctetView
&
stream
);
}
// namespace gtp
src/gnb/gtp/task.cpp
View file @
4146a48a
...
...
@@ -222,20 +222,18 @@ void GtpTask::handleUplinkData(int ueId, int psi, OctetString &&pdu)
void
GtpTask
::
handleUdpReceive
(
const
udp
::
NwUdpServerReceive
&
msg
)
{
OctetView
buffer
{
msg
.
packet
};
auto
*
gtp
=
gtp
::
DecodeGtpMessage
(
buffer
);
auto
gtp
=
gtp
::
DecodeGtpMessage
(
buffer
);
auto
sessionInd
=
m_sessionTree
.
findByDownTeid
(
gtp
->
teid
);
if
(
sessionInd
==
0
)
{
m_logger
->
err
(
"TEID %d not found on GTP-U Downlink"
,
gtp
->
teid
);
delete
gtp
;
return
;
}
if
(
gtp
->
msgType
!=
gtp
::
GtpMessage
::
MT_G_PDU
)
{
m_logger
->
err
(
"Unhandled GTP-U message type: %d"
,
gtp
->
msgType
);
delete
gtp
;
return
;
}
...
...
@@ -247,8 +245,6 @@ void GtpTask::handleUdpReceive(const udp::NwUdpServerReceive &msg)
w
->
pdu
=
std
::
move
(
gtp
->
payload
);
m_base
->
rlsTask
->
push
(
std
::
move
(
w
));
}
delete
gtp
;
}
void
GtpTask
::
updateAmbrForUe
(
int
ueId
)
...
...
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