From 669407ab94896c33d8f4b8c8e8fd3343ffacddcc Mon Sep 17 00:00:00 2001 From: Mathis Engelbart Date: Mon, 29 Apr 2024 10:30:07 +0200 Subject: [PATCH] Fix a race condition cause by out of band signaling Signaling flow IDs may happen out of band and cause a race condition when flow IDs are received before signaling is complete. --- draft-ietf-avtcore-rtp-over-quic.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/draft-ietf-avtcore-rtp-over-quic.md b/draft-ietf-avtcore-rtp-over-quic.md index 361ecf7..347472f 100644 --- a/draft-ietf-avtcore-rtp-over-quic.md +++ b/draft-ietf-avtcore-rtp-over-quic.md @@ -517,7 +517,20 @@ the same flow identifier (following the procedures defined in {{?RFC5761}}), or they can use different flow identifiers. The association between flow identifiers and RTP streams MUST be negotiated -using appropriate signaling. If a receiver cannot associate a flow identifier +using appropriate signaling. The signaling happens out of band and thus a stream +or datagram with a given flow identifer may arrive before the signaling +finished. In that case, an endpoint may not be able to associate the stream or +datagram with the corresponding RTP stream. The endpoint SHOULD buffer streams +and datagrams using an unknown flow identifier until they can be associated with +the corresponding RTP stream. To avoid resource exhaustion, the endpoint SHOULD +limit the number of streams and datagrams to buffer. If the number of buffered +streams exceeds the limit, the endpoint SHOULD send a STOP_SENDING with the +error code ROQ_UNKNOWN_FLOW_ID. It is an implementation's choice on which stream +to send STOP_SENDING. If the number of buffered datagrams exceeds the limit, the +endpoint SHOULD drop a datagram. It is an implementation's choice which datagram +to drop. + +If a receiver cannot associate a flow identifier with any known RTP stream, it MUST close the connection with the application error code ROQ_UNKNOWN_FLOW_ID.