]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: adjust quic_frame flag manipulation
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 16 Aug 2022 12:41:57 +0000 (14:41 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 17 Aug 2022 09:04:47 +0000 (11:04 +0200)
Replace a plain '=' operator by '|=' when setting quic_frame
QUIC_FL_TX_FRAME_LOST flag.

For the moment, this change has no impact as only two exclusive flags
are defined for quic_frame. On the edited code path we are certain that
QUIC_FL_TX_FRAME_ACKED is not set due to a previous if statement, so a
plain equal or a binary OR is strictly identical.

This change will be useful if new flags are defined for quic_frame in
the future. These new flags won't be resetted automatically thanks to
binary OR without explictly intended, which otherwise could easily lead
to new bugs.

src/xprt_quic.c

index bcd99ae702d88e9819415d47759be694eb4dcb45..e366e2049b4f92bdefe1dfd1cadf289b29709475 100644 (file)
@@ -1783,7 +1783,7 @@ static inline void qc_requeue_nacked_pkt_tx_frms(struct quic_conn *qc,
                                /* Mark this STREAM frame as lost. A look up their stream descriptor
                                 * will be performed to check the stream is not consumed or released.
                                 */
-                               frm->flags = QUIC_FL_TX_FRAME_LOST;
+                               frm->flags |= QUIC_FL_TX_FRAME_LOST;
                        }
                        LIST_APPEND(&tmp, &frm->list);
                        TRACE_DEVEL("frame requeued", QUIC_EV_CONN_PRSAFRM, qc, frm);