]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
quic: avoid partial update in ossl_quic_bind_channel
authorJoshua Rogers <MegaManSec@users.noreply.github.com>
Sat, 11 Oct 2025 00:09:43 +0000 (08:09 +0800)
committerTomas Mraz <tomas@openssl.org>
Fri, 17 Oct 2025 17:22:56 +0000 (19:22 +0200)
Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28848)

ssl/quic/quic_channel.c

index 7679ec8790e13724d2706b1f206c11ae2d88a2ed..c7c60d97e9bc39321de2dc76fd8e1fabe87a0190 100644 (file)
@@ -3815,10 +3815,11 @@ int ossl_quic_bind_channel(QUIC_CHANNEL *ch, const BIO_ADDR *peer,
     if (!ossl_assert(ch->state == QUIC_CHANNEL_STATE_IDLE && ch->is_server))
         return 0;
 
-    ch->cur_local_cid = *peer_dcid;
     if (!ossl_quic_lcidm_bind_channel(ch->lcidm, ch, peer_dcid))
         return 0;
 
+    ch->cur_local_cid = *peer_dcid;
+
     /*
      * peer_odcid <=> is initial dst conn id chosen by peer in its
      * first initial packet we received without token.