summaryrefslogtreecommitdiffstats
path: root/ssl/quic/quic_impl.c
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2023-08-10 19:29:27 +0100
committerHugo Landau <hlandau@openssl.org>2023-09-01 10:45:36 +0100
commit3760747ff452fcb3e29190e670073253c5b47d49 (patch)
tree92ba9c7122f68eeeff8d1e83dfcbab7f8684f0e8 /ssl/quic/quic_impl.c
parent277880e754c5a19cc456165560344204373a6b40 (diff)
Minor fixes
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21715)
Diffstat (limited to 'ssl/quic/quic_impl.c')
-rw-r--r--ssl/quic/quic_impl.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/ssl/quic/quic_impl.c b/ssl/quic/quic_impl.c
index 49133f0ca7..839168040b 100644
--- a/ssl/quic/quic_impl.c
+++ b/ssl/quic/quic_impl.c
@@ -1565,15 +1565,13 @@ static int quic_do_handshake(QCTX *ctx)
if (!qc->started && !qc->addressing_probe_done) {
long rcaps = BIO_dgram_get_effective_caps(qc->net_rbio);
long wcaps = BIO_dgram_get_effective_caps(qc->net_wbio);
- int can_use_addressed =
- (wcaps & BIO_DGRAM_CAP_HANDLES_DST_ADDR) != 0
- && (rcaps & BIO_DGRAM_CAP_PROVIDES_SRC_ADDR) != 0;
- qc->addressed_mode = can_use_addressed;
- qc->addressing_probe_done = 1;
+ qc->addressed_mode_r = ((rcaps & BIO_DGRAM_CAP_PROVIDES_SRC_ADDR) != 0);
+ qc->addressed_mode_w = ((wcaps & BIO_DGRAM_CAP_HANDLES_DST_ADDR) != 0);
+ qc->addressing_probe_done = 1;
}
- if (!qc->started && qc->addressed_mode
+ if (!qc->started && qc->addressed_mode_w
&& BIO_ADDR_family(&qc->init_peer_addr) == AF_UNSPEC) {
/*
* We are trying to connect and are using addressed mode, which means we
@@ -1595,7 +1593,7 @@ static int quic_do_handshake(QCTX *ctx)
}
if (!qc->started
- && qc->addressed_mode
+ && qc->addressed_mode_w
&& BIO_ADDR_family(&qc->init_peer_addr) == AF_UNSPEC) {
/*
* If we still don't have a peer address in addressed mode, we can't do