]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: remove unnecessary if in qc_pkt_may_rm_hp()
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 23 Dec 2021 15:02:24 +0000 (16:02 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 23 Dec 2021 15:02:24 +0000 (16:02 +0100)
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.

src/xprt_quic.c

index 5eac5c0b7b7e551f600ac710529374d82dbec1df..91e06eef413c1beb1086f8af675b9ed492020348 100644 (file)
@@ -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;