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
eef0e88e
Commit
eef0e88e
authored
Sep 29, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SCTP connection reset handling
parent
f92bafb8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
1 deletion
+18
-1
src/gnb/rls/task.cpp
src/gnb/rls/task.cpp
+2
-1
src/gnb/sctp/task.cpp
src/gnb/sctp/task.cpp
+7
-0
src/lib/sctp/internal.cpp
src/lib/sctp/internal.cpp
+8
-0
src/lib/sctp/types.hpp
src/lib/sctp/types.hpp
+1
-0
No files found.
src/gnb/rls/task.cpp
View file @
eef0e88e
...
...
@@ -11,6 +11,7 @@
#include <gnb/gtp/task.hpp>
#include <gnb/rrc/task.hpp>
#include <utils/common.hpp>
#include <utils/random.hpp>
namespace
nr
::
gnb
{
...
...
@@ -18,7 +19,7 @@ namespace nr::gnb
GnbRlsTask
::
GnbRlsTask
(
TaskBase
*
base
)
:
m_base
{
base
}
{
m_logger
=
m_base
->
logBase
->
makeUniqueLogger
(
"rls"
);
m_sti
=
utils
::
Random64
();
m_sti
=
Random
::
Mixed
(
base
->
config
->
name
).
nextUL
();
m_udpTask
=
new
RlsUdpTask
(
base
,
m_sti
,
base
->
config
->
phyLocation
);
m_ctlTask
=
new
RlsControlTask
(
base
,
m_sti
);
...
...
src/gnb/sctp/task.cpp
View file @
eef0e88e
...
...
@@ -88,6 +88,13 @@ class SctpHandler : public sctp::ISctpHandler
w
->
clientId
=
clientId
;
sctpTask
->
push
(
w
);
}
void
onConnectionReset
()
override
{
auto
*
w
=
new
NmGnbSctp
(
NmGnbSctp
::
UNHANDLED_NOTIFICATION
);
w
->
clientId
=
clientId
;
sctpTask
->
push
(
w
);
}
};
[[
noreturn
]]
static
void
ReceiverThread
(
std
::
pair
<
sctp
::
SctpClient
*
,
sctp
::
ISctpHandler
*>
*
args
)
...
...
src/lib/sctp/internal.cpp
View file @
eef0e88e
...
...
@@ -173,7 +173,15 @@ void ReceiveMessage(int sd, uint32_t ppid, ISctpHandler *handler)
int
r
=
sctp_recvmsg
(
sd
,
(
void
*
)
buffer
,
RECEIVE_BUFFER_SIZE
,
(
sockaddr
*
)
&
addr
,
&
fromLen
,
&
info
,
&
flags
);
if
(
r
<
0
)
{
if
(
errno
==
ECONNRESET
)
{
if
(
handler
)
handler
->
onConnectionReset
();
return
;
}
ThrowError
(
"SCTP receive message failure: "
,
errno
);
}
if
(
r
==
0
)
return
;
// no data
...
...
src/lib/sctp/types.hpp
View file @
eef0e88e
...
...
@@ -40,6 +40,7 @@ class ISctpHandler
virtual
void
onAssociationSetup
(
int
associationId
,
int
inStreams
,
int
outStreams
)
=
0
;
virtual
void
onAssociationShutdown
()
=
0
;
virtual
void
onConnectionReset
()
=
0
;
virtual
void
onMessage
(
const
uint8_t
*
buffer
,
size_t
length
,
uint16_t
stream
)
=
0
;
virtual
void
onUnhandledNotification
()
=
0
;
};
...
...
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