mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-11 09:37:20 +02:00
BUG/MINOR: quic: fix segfault on CC if mux uninitialized
A segfault happens when receiving a CONNECTION_CLOSE during handshake. This is because the mux is not initialized at this stage but the transport layer dereferences it. Fix this by ensuring that the MUX is initialized before. Thanks to Willy for his help on this one. Welcome in the QUIC-men team !
This commit is contained in:
parent
c48c8b8701
commit
2d0f873cd8
@ -2393,9 +2393,10 @@ static int qc_parse_pkt_frms(struct quic_rx_packet *pkt, struct ssl_sock_ctx *ct
|
||||
case QUIC_FT_CONNECTION_CLOSE:
|
||||
case QUIC_FT_CONNECTION_CLOSE_APP:
|
||||
/* warn the mux to close the connection */
|
||||
if (qc->mux_state == QC_MUX_READY)
|
||||
if (qc->mux_state == QC_MUX_READY) {
|
||||
qc->qcc->flags |= QC_CF_CC_RECV;
|
||||
tasklet_wakeup(qc->qcc->wait_event.tasklet);
|
||||
}
|
||||
break;
|
||||
case QUIC_FT_HANDSHAKE_DONE:
|
||||
if (qc_is_listener(ctx->qc))
|
||||
|
Loading…
Reference in New Issue
Block a user