mirror of
https://github.com/haproxy/haproxy.git
synced 2026-07-15 03:56:56 -04:00
MINOR: quic: Missing case when discarding HANDSHAKE secrets
With very few packets received by the listener, it is possible that its state may move from QUIC_HS_ST_SERVER_INITIAL to QUIC_HS_ST_COMPLETE without transition to QUIC_HS_ST_SERVER_HANDSHAKE state. This latter state is not mandatory.
This commit is contained in:
parent
67f47d0125
commit
754f99e995
1 changed files with 2 additions and 1 deletions
|
|
@ -2661,7 +2661,8 @@ struct task *quic_conn_io_cb(struct task *t, void *context, unsigned int state)
|
|||
goto err;
|
||||
|
||||
st = HA_ATOMIC_LOAD(&qc->state);
|
||||
if (prev_st == QUIC_HS_ST_SERVER_HANDSHAKE && st >= QUIC_HS_ST_COMPLETE) {
|
||||
if (st >= QUIC_HS_ST_COMPLETE &&
|
||||
(prev_st == QUIC_HS_ST_SERVER_INITIAL || prev_st == QUIC_HS_ST_SERVER_HANDSHAKE)) {
|
||||
/* Discard the Handshake keys. */
|
||||
quic_tls_discard_keys(&qc->els[QUIC_TLS_ENC_LEVEL_HANDSHAKE]);
|
||||
quic_pktns_discard(qc->els[QUIC_TLS_ENC_LEVEL_HANDSHAKE].pktns, qc);
|
||||
|
|
|
|||
Loading…
Reference in a new issue