]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: quic: Useless tests in qc_try_rm_hp()
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 21 Feb 2022 18:22:09 +0000 (19:22 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 1 Mar 2022 15:22:35 +0000 (16:22 +0100)
There is no need to test <qel>. Furthermore the packet type has already checked
by the caller.

src/xprt_quic.c

index 314ed2a9de639e1b36140c16883ccf3457f2aa25..cb99826ceb795f2a2fba95bb17eea3592b5a080f 100644 (file)
@@ -3805,7 +3805,7 @@ static inline int qc_try_rm_hp(struct quic_conn *qc,
                pkt->aad_len = pn - beg + pkt->pnl;
                qpkt_trace = pkt;
        }
-       else if (qel) {
+       else {
                if (qel->tls_ctx.rx.flags & QUIC_FL_TLS_SECRETS_DCD) {
                        /* If the packet number space has been discarded, this packet
                         * will be not parsed.
@@ -3819,10 +3819,6 @@ static inline int qc_try_rm_hp(struct quic_conn *qc,
                MT_LIST_APPEND(&qel->rx.pqpkts, &pkt->list);
                quic_rx_packet_refinc(pkt);
        }
-       else {
-               TRACE_PROTO("Unknown packet type", QUIC_EV_CONN_TRMHP, qc);
-               goto err;
-       }
 
        *el = qel;
        /* No reference counter incrementation here!!! */