From: Frédéric Lécaille Date: Wed, 2 Feb 2022 08:41:27 +0000 (+0100) Subject: MINOR: quic: Do not modify a marked as consumed datagram X-Git-Tag: v2.6-dev2~201 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=841bf5e7f4666982e672d8ed9df33dba59d52891;p=thirdparty%2Fhaproxy.git MINOR: quic: Do not modify a marked as consumed datagram Mark the datagrams as consumed at the very last time. --- diff --git a/src/xprt_quic.c b/src/xprt_quic.c index e1dcd62146..0f9987e026 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -5397,14 +5397,14 @@ struct task *quic_lstnr_dghdlr(struct task *t, void *ctx, unsigned int state) break; } while (pos < end); - /* Mark this datagram as consumed */ - HA_ATOMIC_STORE(&dgram->buf, NULL); - /* Increasing the received bytes counter by the UDP datagram length * if this datagram could be associated to a connection. */ if (dgram->qc) dgram->qc->rx.bytes += dgram->len; + + /* Mark this datagram as consumed */ + HA_ATOMIC_STORE(&dgram->buf, NULL); } return t;