Skip to content

[FR][MAINT] Revise RCV message dropping logic #2626

@maxsharabayko

Description

@maxsharabayko

When packet decryption fails, the fields of the packet cannot be trusted, and therefore used for dropping the whole message.
Given that SRT only allows AEAD in live streaming configuration at the moment, it is ok to drop a packet from the RCV buffer based on the packet sequence number used to insert it into the buffer. In the live streaming configuration, one packet represents a single message, thus by dropping one packet the whole message is dropped.

This approach should be good enough for v1.5.2 and for live streaming configuration in general.
A more universal approach would require removing a packet from the RCV buffer (without dropping( and adding the packet sequence number to the RCV loss list (see PR #2649). Also, the RCV buffer state would have to be reset back to the one before the packet has been inserted.
An alternative approach could be to check if the RCV buffer will accept the packet, decrypt and insert it into the buffer only if decryption succeeds.
In any case, such changes would require a more noticeable restructuring of the source code. Something for v1.6.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: MaintenanceWork required to maintain or clean up the code[core]Area: Changes in SRT library core

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions