]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: quic: requeue datagrams received on wrong socket
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 5 Oct 2022 15:56:08 +0000 (17:56 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 2 Dec 2022 13:45:43 +0000 (14:45 +0100)
commitb2bd83972b7f61f674871b9a9722a6192a841322
treed5c52c33b24f3088c8c451423be7aca7ddbce70f
parentb7ce79c814aff94912d3750a137877fc45da230c
MEDIUM: quic: requeue datagrams received on wrong socket

There is a small race condition when QUIC connection socket is
instantiated between the bind() and connect() system calls. This means
that the first datagram read on the sockets may belong to another
connection.

To detect this rare case, we compare the DCID for each QUIC datagram
read on the QUIC socket. If it does not match the connection CID, the
datagram is requeue using quic_receiver_buf to be able to handle it on
the correct thread.

This change is part of quic-conn owned socket implementation.
It may be backported to 2.7 after a period of observation.
src/quic_sock.c