]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Remove vestigual accepted flag
authorNeil Horman <nhorman@openssl.org>
Wed, 22 Jan 2025 15:10:30 +0000 (10:10 -0500)
committerNeil Horman <nhorman@openssl.org>
Mon, 17 Feb 2025 16:27:33 +0000 (11:27 -0500)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26361)

ssl/quic/quic_impl.c
ssl/quic/quic_local.h

index ec9c245257916f010f4dd49931832f0a8f1cf7d1..79bf0edc3c8ac77dc869d0aad46e7f7f1aad01b6 100644 (file)
@@ -811,7 +811,7 @@ void ossl_quic_free(SSL *s)
      * Those don't hold a reference until they are accepted, so only drop
      * the count if the application has accepted them
      */
-    if (ctx.qc->accepted == 1 && ctx.qc->listener != NULL)
+    if (ctx.qc->pending == 0 && ctx.qc->listener != NULL)
         SSL_free(&ctx.qc->listener->obj.ssl);
     if (ctx.qc->domain != NULL)
         SSL_free(&ctx.qc->domain->obj.ssl);
@@ -4461,7 +4461,6 @@ SSL *ossl_quic_new_from_listener(SSL *ssl, uint64_t flags)
 
     qctx_unlock(&ctx);
 
-    qc->accepted = 1;
     return &qc->obj.ssl;
 
 err:
@@ -4577,7 +4576,6 @@ SSL *ossl_quic_accept_connection(SSL *ssl, uint64_t flags)
     conn_ssl = ossl_quic_channel_get0_tls(new_ch);
     conn_ssl = SSL_CONNECTION_GET_USER_SSL(SSL_CONNECTION_FROM_SSL(conn_ssl));
     qc = (QUIC_CONNECTION *)conn_ssl;
-    qc->accepted = 1;
     qc->listener = ctx.ql;
     qc->pending = 0;
     if (!SSL_up_ref(&ctx.ql->obj.ssl)) {
@@ -4608,7 +4606,6 @@ static QUIC_CONNECTION *create_qc_from_incoming_conn(QUIC_LISTENER *ql, QUIC_CHA
     }
 
     ossl_quic_channel_get_peer_addr(ch, &qc->init_peer_addr); /* best effort */
-    qc->accepted = 0;
     qc->listener                = NULL;
     qc->pending                 = 1;
     qc->engine                  = ql->engine;
index 14da9c4aa322c02b5400e8a9149b582a680b7e2a..dd0c16b49f18a203f220723ff14bf0141bd9558b 100644 (file)
@@ -205,9 +205,6 @@ struct quic_conn_st {
     unsigned int                    addressed_mode_w        : 1;
     unsigned int                    addressed_mode_r        : 1;
 
-    /* Flag to indicate if this connection has been accepted */
-    unsigned int                    accepted                : 1;
-
     /* Flag to indicate waiting on accept queue */
     unsigned int                    pending                 : 1;