From: Neil Horman Date: Wed, 22 Jan 2025 15:10:30 +0000 (-0500) Subject: Remove vestigual accepted flag X-Git-Tag: openssl-3.5.0-alpha1~255 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=943b137c2c1e3b2f186285e5483a92fd44bd7804;p=thirdparty%2Fopenssl.git Remove vestigual accepted flag Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz Reviewed-by: Saša Nedvědický (Merged from https://github.com/openssl/openssl/pull/26361) --- diff --git a/ssl/quic/quic_impl.c b/ssl/quic/quic_impl.c index ec9c2452579..79bf0edc3c8 100644 --- a/ssl/quic/quic_impl.c +++ b/ssl/quic/quic_impl.c @@ -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; diff --git a/ssl/quic/quic_local.h b/ssl/quic/quic_local.h index 14da9c4aa32..dd0c16b49f1 100644 --- a/ssl/quic/quic_local.h +++ b/ssl/quic/quic_local.h @@ -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;