Repository navigation
Sync with Haivision SRT 1.5.7 and improve SRTLA reliability - #5
Open
AlexanderWagnerDev wants to merge 94 commits into
Open
AlexanderWagnerDev wants to merge 94 commits into
AlexanderWagnerDev wants to merge 94 commits into
Conversation
…storage. The storage could have empty strings, and dereferencing the first element must not happen.
SRTO_STREAMID, SRTO_PACKETFILTER are directly affected. SRTO_PASSPHRASE was derived correctly.
Using std::array where possible.
The documented length is 4 bytes, the code was setting 8 bytes without checking `optlen`.
…(nonblocking) reported wrong 'connection lost' error
…n#3092). Define __APPLE_USE_RFC_3542 if not defined.
…ed UT (Haivision#3096). * Added requirement for IPv6 for UDP Options test. * Updated documentation.
When building the libsrt binary installer for Windows, also build the libraries for Arm64 target, in addition to Win32 and Win64. The build can be performed anywhere, Visual Studio can build for distinct targets. Before the build on Intel, make sure that your VS installation includes the build tools for Arm64. See scripts/win-installer/README.md for more details. On existing build systems, be sure to run install-openssl.ps1 once to make sure that the Arm64 libraries for OpenSSL are installed. Also fixed a few harmless warnings.
…vision#2997... (Haivision#3108) * [apps] Fix srt-live-transmit stops listening after SRT disconnects during no active input on console Haivision#2997 (Haivision#3108) --------- Co-authored-by: Clement Gerouville <cgerouville@haivision.com> Co-authored-by: Maxim Sharabayko <maxlovic@gmail.com>
…Haivision#3089). Co-authored-by: Sektor van Skijlen <ethouris@gmail.com>
Use the OpenSSL Universal installer on Windows to build on x86/x64 host targeting Arm64 systems.
…n#3117). Now SRT_USE_OPENSSL_STATIC_LIBS is the CMake option of SRT. The OPENSSL_USE_STATIC_LIBS is CMake's option, still has to be used if SRT_USE_OPENSSL_STATIC_LIBS is set. --------- Co-authored-by: lilinxiong <lilinxiong@bilibili.com> Co-authored-by: Mikolaj Malecki <mmalecki@haivision.com>
Co-authored-by: Mikołaj Małecki <mmalecki@haivision.com> Co-authored-by: Sektor van Skijlen <ethouris@gmail.com>
) This pull request fixes issue Haivision#3098 by ensuring that startup() and cleanup() are called automatically. --------- Co-authored-by: Sektor van Skijlen <ethouris@gmail.com> Co-authored-by: Clement Gerouville <cgerouville@haivision.com> Co-authored-by: Sektor van Skijlen <ethouris@gmail.com>
…ivision#3126). Co-authored-by: BX <wcbushy@gmail.com>
…always properly set. (Haivision#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>
* feat: support OHOS(harmonyOS) system compile * add support for OHOS platform detection.
authored-by: Mikolaj Malecki <mmalecki@haivision.com>
…#3307) Co-authored-by: Mikołaj Małecki <mmalecki@haivision.com>
…ion (Haivision#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>
…n#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>
…#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>
…nup. (Haivision#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>
…aivision#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>
SRTLA ACKs no longer wait for a full batch of 10: a partial batch is flushed (variable length) once its oldest entry ages out, both on ingress and in the periodic pass.
Under SRTO_SRTLA, loss reports (first report and repeats) are emitted solely from checkNAKTimer, gated by an adaptive time hold derived from per-link measurements, with RTT-based repeat spacing. Loss records keep their time history across splits and persist until recovered or dropped. SRTLA connections enforce a minimum receiver latency. Plain SRT behaviour is unchanged. Full test suite passes.
* Mimimum patch to fix spoofed MKREQ failure * Fixed test to match the current internal conditions * Removed rejection of KMX addressing the currently used key * Simplified error value transfer * Update to version 1.5.6 * [crypto] Added rollback for changed KEK when km_unwrap failed * Fix KMREQ buffer overflow at the right place. * [core] Fixed response for rogue KMREQ message --------- Co-authored-by: Mikolaj Malecki <mmalecki@haivision.com> Co-authored-by: Clément Gérouville <cgerouville@haivision.com>
Adds pctSndQuality / pctRcvQuality to CBytePerfMon (100 = clean, 0 = nothing through), reported over a one-second sampling window that the timer thread rolls on its own cadence. Readers therefore get the last completed window: the value is independent of srt_bstats()'s clear flag and of how often the caller polls, so repeated reads within a window agree and a bad second does not linger in the following ones. Receive quality uses a new pktRcvLossConfirmed counter that, unlike pktRcvLoss (RFC 4737 sequence-discontinuity, which counts reordering as loss), counts only sequences the receiver actually concluded were lost and requested back. NAK repeats are excluded (first report only, keyed on the loss record's report_time). Exposed in statswriter; groups report a clean window, as loss is a per-member property.
dropFromLossLists() never revoked SRTLA loss records because the reorder tolerance is 0 there, so unrecovered losses stayed in the report for the life of the connection, crowding out fresh losses and drawing DROPREQ replies from the sender. Align the guard with unlose(), stop requesting records that no longer fit a round trip in the play budget, and move the selection into srtlaPlanNak() so it can be unit-tested.
srtla_send charges a hundred times more per needless request than it pays back per acknowledged packet. Space repeats by a full round trip plus the reorder hold instead of 1.3 x SRTT, report fresh losses before repeats so a backlog cannot crowd them out, and keep the SRTLA emitter active with SRTO_NAKREPORT=0, since it is the only loss-report path there.
Fanning loss reports out over every link cost the sender a packet-log walk and a duplicate retransmission per extra copy; they now go over the link that most recently delivered plus one for redundancy, while ACKs keep going everywhere because the sender rebuilds its in-flight counts from them. Also: stale links no longer widen the reorder hold, partial SRTLA-ACK batches flush after 10 ms so thin links are not starved, and the per-link pass in onPeriodic() is throttled.
…on (Haivision#3349) * Fixed gcov rule. Fixed ABI compliance checker to use local installation * Removed codecov for C++03. Fixed wrong call path for gdb after tests * Fixed crypto tests build break when encryption disabled * Fixed CI on macos. Tracking a problem on ABI * Refactored TestEnforcedEncryption to simplify initialization * Fixed ABI. Fixed mac warn build break on ENC=no * Added missing ASH variable to output * Tracking problem with ABI * Changed abi compliance checker to official package. Fixed options in configure-data * Preserved RES up until the end to prevent error blocking report download * Changed command call to swallow error result (prevents premature interrupt of the step) * Fixed uploading HTML report for ABI * I hate YAML * Using Create Browser Link instead * Changed ABI reporting to uploading html with no zipping * Updated Ubuntu packages before installing --------- Co-authored-by: Mikolaj Malecki <mmalecki@haivision.com>
…#3323) * [core] Added checks to prevent rogue CMD MSG to sneak thru * [core] Fixed OOB read in ACK payload parsing. * Added protection against rogue DROPREQ. Added status return for cmd dispatchers. Changed tests for cmd dispatchers to work on a connected socket. Added protection against rogue DROP in receiver buffer * Fixed codespell * Wrong keyword for CUnit in tests --------- Co-authored-by: Mikolaj Malecki <mmalecki@haivision.com>
* Fixed vulnerabilities reported as SRTX-61 * Next portion of fixes from SRTX-62 * Fixed Haivision#11 for SRTX-62 * Added MD5 check to the dependency installer scripts * Applied safety fixes for Windows installer scripts * Post-review fixes for vulnerability issues * Post-review fixes, take 3 * Remaining parts of Take 3 * Fixes, take 4. Fixed ASSERT usage in FEC tests * Take 5, possibly final * Fixed build break with --disable-encryption * Fixed codespell --------- Co-authored-by: Mikolaj Malecki <mmalecki@haivision.com>
Updated link to SRT Alliance Deployment Guide
Co-authored-by: Clément Gérouville <cgerouville@haivision.com>
…cy floor Repeat spacing follows the measured inter-link spread instead of the floored reorder hold, the NAK timer runs at a fixed 20 ms period under SRTLA, and repeats speed up towards the play deadline. The previous timing waited too long for lost retransmissions under sustained loss. The 1000 ms minimum receiver latency under SRTLA is logged when it raises a lower setting and documented with SRTO_SRTLA.
Drives receiver builds with the unmodified BELABOX sender stack through a userland link-impairment proxy (2 to 8 links, 1000 to 5000 ms latency, a catalogue of real-world scenarios) and scores them against a base build. The workflow runs the ci set on pull requests against main and posts the scorecard. Third-party code is neither copied nor patched.
A retransmission carries the original packet's timestamp, so sampling it measured the age of the loss instead of the link delay. Under heavy loss this inflated the measured spread to seconds, pinned the reorder hold at its cap and delayed every request until the sender had already dropped the packet. Retransmissions still count as received data. Heavy-logging builds now trace every loss record's detection, requests and recovery.
…ilds losstrace.py builds per-drop timelines from a heavy-logging receiver log; build.sh takes CMAKE_EXTRA and RECEIVER_DEBUG=1 runs the receiver at debug level. Every run records the exit codes of its four processes, and a run whose stream died early is excluded from the score like a host stall.
Merge the complete OpenIRL SRTLA patch stack through v1.5.4+openirl.3 onto Haivision SRT v1.5.7, including SLS 1.5.2 source compatibility.
… rebind Port the v1.5.4+openirl.4 fixes onto the SRT 1.5.7 base. - Keep a group bound to a live SRT connection while it has no links, so REG2 with the same group id re-registers instead of receiving REG_NGP. Release the binding from CRcvQueue::removeFromLists() when the connection leaves the receive queue. - Reset sequence-number tracking, timestamp references, bitrate, transit and jitter state when a different SRT socket binds to a surviving group. - Account only packets addressed to the bound socket, so delayed packets from a previous connection or a refused reconnect cannot corrupt the sequence-number window. - Add SrtlaRec unit tests for all-links outages while bound, re-registration, rebind accounting reset, stale-connection packets, stats isolation, same-socket rebind and group cleanup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR updates the OpenIRL SRT fork from SRT 1.5.4 to Haivision SRT 1.5.7, ports the complete OpenIRL SRTLA integration onto the updated codebase, and introduces improvements to reliability, packet recovery, security, testing, and maintainability.
The goal is to bring OpenIRL SRT up to date with upstream development while preserving SRTLA functionality and compatibility with existing integrations, including srt-live-server 1.5.2.
Key Changes
Upstream SRT Update
SRTLA Improvements
Testing and CI
Maintenance and Documentation
Compatibility
Validation
The PR includes additional unit tests and an automated SRTLA end-to-end regression workflow.
Build compatibility, test results, and runtime behavior should be reviewed before merging.
Additional Notes
This is a substantial synchronization containing upstream SRT changes alongside OpenIRL-specific improvements. Particular attention should be given to SRTLA integration, runtime compatibility, licensing, and regression test results.
Feedback and suggestions are welcome.