]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: reappend rxbuf buffer on fake dgram alloc error
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 4 Aug 2023 13:37:29 +0000 (15:37 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 4 Aug 2023 13:42:30 +0000 (15:42 +0200)
A thread must always reappend the rxbuf instance after finishing
datagram reception treatment. This was not the case on one error code
path : when fake datagram allocation fails on datagram requeing.

This issue was introduced with the following patch :
  commit b34d353968db7f646e83871cb6b21a246af84ddc
  BUG/MEDIUM: quic: consume contig space on requeue datagram
As such, it must be backported in every version with the above commit.

src/quic_sock.c

index f45cd91cadd8ac1396a987b3f4d3193b35f0feb7..88bcb1a31f4afbc9db5800890c6c39aaa0895697 100644 (file)
@@ -749,6 +749,7 @@ int qc_rcv_buf(struct quic_conn *qc)
                                struct quic_dgram *fake_dgram = pool_alloc(pool_head_quic_dgram);
                                if (!fake_dgram) {
                                        /* TODO count lost datagrams */
+                                       MT_LIST_APPEND(&l->rx.rxbuf_list, &rxbuf->rxbuf_el);
                                        continue;
                                }