2004 Commits

Author SHA1 Message Date
Sektor van Skijlen c39196c9a5 [CI] Added configuration for Linux with various matrix combinations (#3300)
* [CI] Added configuration for Linux with various matrix combinations

* Some minor fixes

* Fixed YAML syntax error

* Fixed C++ std spec

* Consolidated build options

* Fixed exclude list

* Fixed exclude list

* Fixed matrix combinations

* Replaced with two linear matrices

* Fixed description

* Changed names and split to single files

* Blocked matrix, added variants to C++03

* Fixed wrong config on C++03

* Fixed names

* Small fixes in crypto matrix

* Removed crypto builds. Added MinGW build

* Fixed MinGW typo. Added core handling for Linux

* Added more platforms with C++11. Unset -Werror for MinGW

* Added fixes per build break on MinGW

* More Windows fixes

* Fixed invalid specialization after fixing for Windows

* More fixes for Windows and MinGW

* Fixed invalid definition for UDP socket in testing apps

* Renamed Windows workflow

* Fixed multiple machines for Linux/C++11 syntax

* Linux matrix: blocked gdb for other than ubuntu-latest

* Linux matrix: blocked gdb for other than ubuntu-latest (fixed syntax error)

* Separated preinstallation action to track the problem

* Configured noenc on platforms with no SSL available

* Separated preinstallation action to track the problem 2

* Blocked installation except ubuntu-latest

* Removed slim as it has no access to cmake

---------

Co-authored-by: Mikołaj Małecki <mmalecki@haivision.com>
2026-06-08 14:31:38 +02:00
Sergio 2dc8c18c7e fix: searchParameters separator (#3328) 2026-06-08 09:42:39 +02:00
Sektor van Skijlen 1e4c908c51 [core] Removed unnecessary post-cleaning of closed socket in the cleanup. (#3327)
* Trial changes for SRT package

* [core] Added death-garbage-aware cleanup

* post fixes

* Fixed: removed special procedure for cleanup on final destruction. Removed cleaning up sockets after GC exit. Added description

* Renamed forceRemove

* Fixed codespell

---------

Co-authored-by: Mikolaj Malecki <mmalecki@haivision.com>
2026-06-05 10:26:00 +02:00
Matthew Szatmary 2e2ab20ee0 [BUG] Reject CRcvBuffer::dropMessage range past buffer end (#3322)
dropMessage early-returns when offset_b < 0 (the entire range is
before the buffer start), but does not symmetrically guard against
offset_a >= m_szSize (the entire range is past the buffer end).
In that case start_off = offset_a is unbounded; incPos() wraps
modulo m_szSize and the loop walks legitimate buffer entries,
marking them EntryState_Drop -- corrupting receiver state from a
single malformed call.

Add a symmetric early return for offset_a >= m_szSize.

Add CRcvBufferReadMsg.PacketDropLoPastBufferEnd covering the new
guard: insert two packets, request a drop whose lo is well past
the buffer end, assert no packets were dropped and the buffered
packets are still readable.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 14:20:43 +02:00
Matthew Szatmary 033d1d547f [BUG] Fixed OOB read in LOSSREPORT range parsing (#3324) 2026-05-21 10:28:16 +02:00
Matthew Szatmary d7957ac5d9 [BUG] Fixed OOB read in DROPREQ payload parsing (#3320) 2026-05-19 09:45:27 +02:00
Sektor van Skijlen 798f660be1 [core] Vulnerability fixed: unchecked buffer size for KMREQ (#3317)
* [core] Vulnerability fixed: unchecked buffer size for KMREQ

* force word-aligned data length.

Co-authored-by: Matthew Szatmary <matt@szatmary.org>

---------

Co-authored-by: Mikolaj Malecki <mmalecki@haivision.com>
Co-authored-by: cl-ment <cl-ment@users.noreply.github.com>
Co-authored-by: Matthew Szatmary <matt@szatmary.org>
2026-05-18 10:37:25 +02:00
Matthew Szatmary 604a406546 [BUG] Validate KMRSP wire length to prevent stack overflow (#3319) 2026-05-18 10:29:15 +02:00
Sektor van Skijlen 8e68635cf1 [BUG] Fixed a heavy-logging instruction that may crash on initialization (#3310)
* [BUG] Fixed a heavy-logging instruction that may crash on initialization

* Protect calls to logger functions by checking on src_config NULL

---------

Co-authored-by: Mikolaj Malecki <mmalecki@haivision.com>
2026-05-06 10:16:03 +02:00
Sektor van Skijlen b6b4ae990d [build] Add enabler variable to importing variable feature (#3307)
Co-authored-by: Mikołaj Małecki <mmalecki@haivision.com>
v1.5.5
2026-04-17 08:56:57 +02:00
cl-ment c3cfa17e2a [doc] Update badges in README.md (#3301)
* [doc] Remove a badge (Travis)

* Update repology's badges

---------

Co-authored-by: Clément Gérouville <cgerouville@haivision.com>
v1.5.5-rc.2
2026-04-07 09:49:14 +02:00
Sektor van Skijlen 44d106f491 [BUG] Incorrect error code when srt_listen on closed socket (#3298)
* [BUG] Incorrect error code when srt_listen on closed socket

* Fixed API description

* Ask Codespell to ignore the TEST() macro.

* Replace few if statements by a switch statement.

* Status SRTS_NONEXIST throws MN_CLOSED instead of MN_ISUNBOUND

* Manage the rendez-vous case first

---------

Co-authored-by: Mikolaj Malecki <mmalecki@haivision.com>
Co-authored-by: Clément Gérouville <cgerouville@haivision.com>
2026-03-30 10:34:34 +02:00
Sektor van Skijlen f04c00cdd7 [build] Fixed use of CMP0077 policy in too old cmake (#3295) 2026-03-17 17:31:17 +01:00
Sektor van Skijlen 15cb088561 [core][bug] Fixed misleading error code when connecting a broken socket (#3291)
Co-authored-by: Mikolaj Malecki <mmalecki@haivision.com>
v1.5.5-rc.1
2026-03-06 11:21:24 +01:00
Sektor van Skijlen 951a87a8a7 [core] [bug] Fixed bug: interrupting a blocking connect loop must be recognized per the same condition (#3290)
Co-authored-by: Mikolaj Malecki <mmalecki@haivision.com>
2026-03-04 15:38:52 +01:00
Maxim Sharabayko ce54b5ea36 [docs] Fixed SRTO_PASSWORD max length description. 2026-02-20 13:19:21 +01:00
Rostyslav Kurylo c47c3e3c59 [bug][core] Fix group data length check in handshake processing (#3272)
* Fix group data length check in handshake processing

* Apply suggestions from code review

Changed the maximum size of copied data to the size of the array.

* Apply suggestion from @ethouris

Fixed through a separate variable.

---------

Co-authored-by: Sektor van Skijlen <ethouris@gmail.com>
2026-02-05 08:47:27 +01:00
Tomoya Fujita 2220de5040 [docs] fix bunch of typos and enable codespell via github workflow. (#3263)
* fix bunch of typos and enable codespell via github workflow.

Signed-off-by: Tomoya.Fujita <tomoya.fujita825@gmail.com>

* address review comments.

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>

* Replace instability by unstability and insecure by unsecure.

* Rollback instability!

* Moving the configuration files to scripts/codespell.

* Replace connenctions by connections.

---------

Signed-off-by: Tomoya.Fujita <tomoya.fujita825@gmail.com>
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Co-authored-by: Clément Gérouville <cgerouville@haivision.com>
2026-01-20 09:25:10 +01:00
Tomoya Fujita 80c871e1fe Detec IPv6 with colon to harden the check if IPv6 is used in the test. (#3264)
* Detec IPv6 with colon to harden the check if IPv6 is used in the test.

Signed-off-by: Tomoya.Fujita <tomoya.fujita825@gmail.com>

* just relies on srt::CreateAddr to resolve IP family.

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>

---------

Signed-off-by: Tomoya.Fujita <tomoya.fujita825@gmail.com>
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
2026-01-12 14:41:37 +01:00
Tomoya Fujita f5e6bb98d5 Old URL (404 - no longer exists) (#3271)
Signed-off-by: Tomoya.Fujita <Tomoya.Fujita@sony.com>
2026-01-12 11:07:32 +01:00
Sektor van Skijlen 72f0c6e0e9 [BUG] [core] Prevent blocking srt_close call from interrupting connection (#3259)
* [BUG] Prevent blocking srt_close call from interrupting connection

* Test: added check that srt_close call is not blocked. Ensured that waiting is interrupt ed on close. Ensured that the socket is closed right after wait quit

* Fixed incorrect C++17 literals

* Increased wait time tolerance for srt_close (failing on some slower CI machines)

---------

Co-authored-by: Mikołaj Małecki <mmalecki@haivision.com>
2025-12-16 09:37:59 +01:00
Tomoya Fujita f8a53dadfb [build] Ubuntu 23.04 reached end-of-life in January 2024. (#3261)
Signed-off-by: Tomoya.Fujita <tomoya.fujita825@gmail.com>
2025-12-16 09:37:02 +01:00
Sektor van Skijlen f0368c6998 [build] Added handling of LIBSRT_ prefix when setting cmake options for SRT build (#3219)
* [BUILD] Added handling of LIBSRT_ prefix when setting cmake options for SRT build

* Added documentation

* Apply suggestions from code review

Co-authored-by: stevomatthews <smatthews@haivision.com>

* Fixed text alignment after doc review

---------

Co-authored-by: Mikolaj Malecki <mmalecki@haivision.com>
Co-authored-by: stevomatthews <smatthews@haivision.com>
2025-11-25 08:50:17 +01:00
Maria Sharabayko c09532f8ed [docs] Added link to the blogpost with - Live Streaming using SRT with QUIC Datagrams - research 2025-10-27 16:31:28 +01:00
Sektor van Skijlen a26a7021a5 [core] Reimplemented MAXREXMITBW controller basing on Token Bucket algorithm (#3220)
* Added more logs around rexmit bandwidth

* [API] raise libSRT version number to 1.5.5

* Maintenance changes

* Rewrite the Bandwidth estimation system.

* Merged changes from Clement's implementation

* Introduce CShaper to control the retransmission BW.

* Fixed with average packet size measurement

* Added self-adjusting of burst period

* Fixed wrong formulas and added some logs

* Removed old changes for CSndRateEstimator. Blocked the use of CSndRateEstimator.

* Applied most direct review fixes

* Refactoring: split packLostData into smaller parts

* Some cosmetic fixes

* Cosmetics

* Removed Tie function that was using non-C++03-compatible assignment

* Stretched connection timeout for accept in FEC tests

* Trying to track the problem in FEC tests on Mac

* Adjusted TestFEC tests to a bug in listener missing signal

---------

Co-authored-by: Mikolaj Malecki <mmalecki@haivision.com>
Co-authored-by: Clément Gérouville <cgerouville@haivision.com>
2025-10-22 10:47:34 +02:00
Sektor van Skijlen 547688cce7 [core] Restored old cookie contest. Added development support for enforcing cookie values. (#3227)
* Initial testing version of the cookie contest fix

* Setting cookie contest 1.5.4 as default

* [core] Restored old cookie contest. Added ignored wrong peer response on cookie collision

* Fixed security report

* Removed the (unnecessary now) fix for the future version compatibility

* Update test/test_common.cpp - fixed a typo in a comment

* Fixed TestFEC tests to be resistant of a listener-readiness bug (fixed in dev)

* Try to fix the first issue

* Removed remains after the screw-in cookie procedures

---------

Co-authored-by: Mikolaj Malecki <mmalecki@haivision.com>
Co-authored-by: Clément Gérouville <cgerouville@haivision.com>
2025-10-22 08:55:08 +02:00
cl-ment 84676b50be [build] Avoid using list(PREPEND). (#3230)
Co-authored-by: Clément Gérouville <cgerouville@haivision.com>
2025-10-21 16:59:14 +02:00
Sektor van Skijlen 5c5f5b5f3a [MAINT] Add fixes for CI configuration based on latest dev (#3232)
* [MAINT] Add fixes for CI configuration based on latest dev

* Added fixes from another PR

* Added lacking scripts and repos

* Fixed error reported in CI. Fixed ABI entry

---------

Co-authored-by: Mikolaj Malecki <mmalecki@haivision.com>
2025-10-15 13:23:41 +02:00
Clément Gérouville bab403744b [API] raise libSRT version number to 1.5.5 v1.5.5-rc.0a 2025-09-03 10:21:27 +02:00
Aleksey S P 52ceecdf51 Fix SIGABRT when bonding option is too long (#3210)
* Fix SIGABRT when bonding option is too long

* Move the UT to test_bonding.cpp

---------

Co-authored-by: Clément Gérouville <cgerouville@haivision.com>
v1.5.5-rc.0
2025-09-01 15:14:14 +02:00
Sektor van Skijlen 9b97cfa235 [core] Fixed reentrancy problem of srt_strerror (#3214)
* [core] Fixed reentrancy problem of srt_strerror

* [docs] Updated documentation for srt_strerror

---------

Co-authored-by: Mikolaj Malecki <mmalecki@haivision.com>
2025-09-01 14:28:01 +02:00
cl-ment 5138f37d45 [core] Cleanup SRT state after a fork() (issue #3177) (#3179)
* [core] Cleanup SRT state after a fork() (issue #3177)

* Free socket memory without calling the destructor.

* Remove srt_cleanupAtFork() from the API.

* Make it compile on systems that don't support pthread_atfork()

* Remove a typo

* Avoid to send shutdown packet when cleaning up after a fork.

* Close the dangling UDP sockets, Free memory.

* Add TODO for freeing the Send Queue after refacttoring it.

* Ensure that CThread is joinable before join()

* Try fix iOS-cxxsyncOFF

* Replace the mutex pointer by a mutex reference.

* Refactor the Multiplexer initialization.

* Fix SIGSEGV

* Fix Compilation error on a Debug Log

* Rollback to cleaner code for the multiplexer initialization.

* Add compatibility with C++11 Sync.

* Apply code review changes

* Replace the resetThread() macro by an inline function.

Co-authored-by: Sektor van Skijlen <ethouris@gmail.com>

* Reset m_CGStopCond in CUDTUnited

* Rework of resetThread()

* Ensure Garbage collector is in the right state after fork.

* Protect ~CMultiplexer() against NULL pointers.

* Protect resetAtFork() and stop() against NULL pointers.

* Added fork example to the repository

* Remove french comments.

---------
Co-authored-by: Clément Gérouville <cgerouville@haivision.com>
Co-authored-by: Sektor van Skijlen <ethouris@gmail.com>
Co-authored-by: Mikolaj Malecki <mmalecki@haivision.com>
2025-08-29 13:15:35 +02:00
Sektor van Skijlen 265d0e495f [core] Fixed invalid cookie contest calculation (#3212)
Co-authored-by: Mikolaj Malecki <mmalecki@haivision.com>
2025-08-29 13:10:58 +02:00
cl-ment 725e2d4721 [build] Update Ubuntu runners to Lastest. (#3180)
* [build] Update Ubuntu runners to 22.04.

* Update to googletest-1.12.1

* Remove Unit Tests from the ABI workflow.

* Use latest version of ubuntu

* Remove build-wrapper.

---------
Authored-by: Clément Gérouville <cgerouville@haivision.com>
2025-08-27 10:56:20 +02:00
Sektor van Skijlen d720b8c9a4 [core] Rework m_bListening to lock-free and m_GlobControlLock to use shared mutex (#3189)
* [MAINT] Added optional test discovery. Added improvements for attributes

* Enabled C++17 version of shared mutex when compiling in C++17 mode

* [core] Rework m_bListening to lock-free and m_GlobControlLock to use shared mutex

* Added UT discovery option to configure

* Changed enabled std::shared_mutex only if compiling with stdc++-sync

* Fixed problem with not updated sync.cpp SharedMutex

* Removed dead code

* Fixed review findings

* Demoted some locks on m_GlobControlLock to shared. Added false positive TSan info

* Merged changes from #3200

* Added a fix that should repair the problem reported in 3196. Still needs rechecks

* Fixed incorrect shared lock applied for a case when a new group is to be created (required exclusive)

---------

Co-authored-by: Mikolaj Malecki <mmalecki@haivision.com>
2025-08-26 09:36:12 +02:00
Mikolaj Malecki 7497397023 [core] Fixed bug in srt_epoll_uwait: wrong number of sockets returned 2025-08-21 12:55:59 +02:00
Sektor van Skijlen e9160f9228 [MAINT] Added optional test discovery. Added improvements for attributes. Enabled std shared mutex if compiling with C++17 (#3190)
* [MAINT] Added optional test discovery. Added improvements for attributes

* Enabled C++17 version of shared mutex when compiling in C++17 mode

* Added UT discovery option to configure

* Changed enabled std::shared_mutex only if compiling with stdc++-sync

* Fixed problem with not updated sync.cpp SharedMutex

* Fixed review findings

---------

Co-authored-by: Mikolaj Malecki <mmalecki@haivision.com>
2025-08-19 11:45:07 +02:00
Sergei Ignatov 5d80411f0c [build] Update iOS build scripts (#3182)
* Update iOS build scripts
~ Generate Xcode project files
~ Support build for tvOS
~ Package all variants into XCFramework bundle

* Fix iOS / iOS-cxxsyncON
2025-07-17 08:33:38 +02:00
Clément Gérouville 0c570a10e3 [build] Remove SonarQube 2025-06-30 11:07:32 +02:00
cl-ment d6d0e5a964 [build] + [core] compilation of SRT on platforms that do not support the pthread_condattr_setclock function. (#3152)
* [core],[build] check phtread_condattr_setclock (Android < 21)
* Update CMakelists.txt with #3154 to fix travis buildbreak.
---------

Co-authored-by: Lilinxiong Zhouliuya  <lilinxiong1997@gmail.com>
2025-06-06 14:32:04 +02:00
Sektor van Skijlen 21370a7e8f [core] Fixed problems found by thread and memory sanitizers (#3166)
* Fixed some thread-related problems

* Fixed a leak in group objects

* Fixed incorrect conditional for a group closure fix

* Update srtcore/group.cpp - comment typo

---------

Co-authored-by: Mikolaj Malecki <mmalecki@haivision.com>
2025-05-21 15:36:37 +02:00
yaruno 19113e65d9 [build] Update cxx11-macos.yaml (#3170)
* Update for compatibility with CMake 4.x

* Update cxx11-macos.yaml

Downgrade googletest to 1.16.x as latest one requires C++ 17

* Update cxx11-macos.yaml

try to download the exact version of google test formula from homebrew history

* Update cxx11-macos.yaml

downgrade googletest to 1.12.1

---------

Co-authored-by: Sam Umbach <samumbach@gmail.com>
2025-05-19 14:41:09 +02:00
Sam Umbach 0def1b1a10 [build] Update for compatibility with CMake 4.x (#3167) 2025-05-19 14:39:46 +02:00
Mikolaj Malecki 952f949524 [test] Fixing ConnectNonBlocking: delay listen to prevent connection from being established too early 2025-03-21 11:31:04 +01:00
Sektor van Skijlen ee03ae90c4 [tests] Fixed tests to avoid mistakes in CI (#3143)
authored-by: Mikolaj Malecki <mmalecki@haivision.com>
2025-03-14 09:45:21 +01:00
Mikolaj Malecki 4d0e984088 [core] Fixed accidental blocking on sendmsg call 2025-03-14 09:11:38 +01:00
zhouliuya 0976f76a9d [build] support OHOS(harmonyOS) system compile (#3139)
* feat: support OHOS(harmonyOS) system compile

* add support for OHOS platform detection.
2025-03-13 11:22:27 +01:00
Mikolaj Malecki f8e1bd6d3c [core] Late-rejection when listener responds with no packet filter 2025-03-12 11:15:36 +01:00
Sektor van Skijlen f3a8fe3f28 [core] Fixed bug: tsbpd might miss m_bClosing flag setting, flag not always properly set. (#1709)
* [core] Fixed bug: tsbpd might miss m_bClosing flag setting, flag not always properly set. Added some sanity checks

* Removed excessive variable

* Added important comment from another PR

* Localized the bWokeUpOnSignal variable better

* Removed time-interrupted waiting on TsbPd thread as it caused more CPU usage

---------

Co-authored-by: Mikołaj Małecki <mmalecki@haivision.com>
2025-03-12 11:14:23 +01:00
Sektor van Skijlen 697dce0978 [apps] Fixed correct bind address selection for windows multicast (#3126).
Co-authored-by: BX <wcbushy@gmail.com>
2025-02-28 10:02:28 +01:00