From: Amaury Denoyelle Date: Thu, 23 Dec 2021 15:02:24 +0000 (+0100) Subject: MINOR: quic: remove unnecessary if in qc_pkt_may_rm_hp() X-Git-Tag: v2.6-dev1~226 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=741eacca4780a3aee8325665fe380063c80faa6f;p=thirdparty%2Fhaproxy.git MINOR: quic: remove unnecessary if in qc_pkt_may_rm_hp() Remove the shortcut to use the INITIAL encryption level when removing header protection on first connection packet. This change is useful for the following change which removes ssl_sock_ctx in argument lists in favor of the quic_conn instance. --- diff --git a/src/xprt_quic.c b/src/xprt_quic.c index 5eac5c0b7b..91e06eef41 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -3482,12 +3482,6 @@ static int qc_pkt_may_rm_hp(struct quic_rx_packet *pkt, { enum quic_tls_enc_level tel; - /* Special case without connection context (first Initial packets) */ - if (!ctx) { - *qel = &qc->els[QUIC_TLS_ENC_LEVEL_INITIAL]; - return 1; - } - tel = quic_packet_type_enc_level(pkt->type); if (tel == QUIC_TLS_ENC_LEVEL_NONE) { *qel = NULL;