From 841bf5e7f4666982e672d8ed9df33dba59d52891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Wed, 2 Feb 2022 09:41:27 +0100 Subject: [PATCH] MINOR: quic: Do not modify a marked as consumed datagram Mark the datagrams as consumed at the very last time. --- src/xprt_quic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xprt_quic.c b/src/xprt_quic.c index e1dcd6214..0f9987e02 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;