SCCP + SIGTRAN (SUA/M3UA) libraries as well as OsmoSTP https://osmocom.org/projects/libosmo-sccp
Go to file
Harald Welte 6ebfc047dd Fix race during fast re-establishment of inbound M3UA connections
When a client closes and instantaneously re-opens a SCTP socket for an
M3UA connection, there is a chance that both the "shutdwon event" (old
connection socket becomes readable for sctp event) and the "init event"
(listen-fd becomes readable) happen during the same scheduler interval /
select() cycle.  As there is no guaranteed order by which we call our
file descriptor callbacks, it means that we may end up processing
then new connection (accept) before we get the notification that the
old one is dead.

The fact that the fd number of the accept-fd is mostly lower than the fd
number of the individual per-client connection actually makes it likely
that the order is exactly the opposite of what would feel "logical".

As the ASP is identified by the tuple of (src-port, src-ip, dst-port, dst-ip),
both the old connection and the new connection map to the same ASP
object.  So we need to handle this situation gracefully:  If we get a
new connection for a tuple that we already [think we still] have one,
close the old one and use the new.

Change-Id: I9b3ae6dfcf6efeabb7fb6c33503d1d7924fec2fa
Closes: OS#4625
2020-06-24 21:36:54 +02:00
contrib libosmo-sccp.spec.in: Use %config(noreplace) to retain current config file 2020-06-22 14:23:09 +02:00
debian Bump version: 1.1.0.71-bb75-dirty → 1.2.0 2020-01-02 21:24:11 +01:00
doc doc: make sure all log categories are set to level notice 2020-05-12 11:29:18 +00:00
examples examples/sccp_test_server: Log disconnect indication in echo service 2020-01-21 10:53:34 +01:00
include add osmo_sccp_user_find() as public API 2020-05-22 23:15:55 +02:00
specs add RFC 3868 (SUA) spec in HTML 2017-01-27 09:59:30 +01:00
src Fix race during fast re-establishment of inbound M3UA connections 2020-06-24 21:36:54 +02:00
stp stp: exit(2) on unsupported positional arguments on command line 2019-12-17 15:02:28 +01:00
tests Add "no traffic-mode" configuration to AS 2020-06-13 16:15:41 +02:00
.gitignore contrib: integrate RPM spec 2020-05-19 15:20:17 +02:00
.gitreview Add gerrit settings 2016-12-21 13:46:12 +01:00
COPYING move openbsc into its own subdirectory 2009-06-10 05:40:52 +08:00
Doxyfile.in Doxugen: s/libosmo-sccp/libosmo-sigtran/g 2017-10-27 21:10:18 +02:00
Makefile.am Makefile.am: EXTRA_DIST: debian, contrib/*.spec.in 2020-05-22 13:29:41 +02:00
TODO-RELEASE Bump version: 1.1.0.71-bb75-dirty → 1.2.0 2020-01-02 21:24:11 +01:00
configure.ac contrib: integrate RPM spec 2020-05-19 15:20:17 +02:00
git-version-gen git-version-gen: Don't check for .git directory 2018-07-24 18:03:20 +02:00
libosmo-mtp.pc.in Revert "Fix the .pc files so the -l arg matches the installed libraries" 2016-11-03 13:04:34 +00:00
libosmo-sccp.pc.in Revert "Fix the .pc files so the -l arg matches the installed libraries" 2016-11-03 13:04:34 +00:00
libosmo-sigtran.pc.in libosmo-sigtran: Add pkg-config integration 2015-12-22 23:03:44 +01:00
libosmo-xua.pc.in Add missing xua.pc file 2016-11-03 12:36:41 +00:00
osmoappdesc.py osmoappdesc.py, tests: switch to python 3 2019-12-12 09:18:58 +00:00