BUG/MINOR: quic: fix segfault on trace for version negotiation

When receiving Initial packets for Version Negotiation, no quic_conn is
instantiated. Thus, on the final trace, the quic_conn dereferencement
must be tested before using it.
This commit is contained in:
Amaury Denoyelle 2021-11-18 14:38:00 +01:00
parent 56d3e1b0bd
commit ed66b0f04a

View File

@ -3874,7 +3874,7 @@ static ssize_t qc_lstnr_pkt_rcv(unsigned char **buf, const unsigned char *end,
if (conn_ctx && HA_ATOMIC_LOAD(&conn_ctx->conn->ctx))
tasklet_wakeup(conn_ctx->wait_event.tasklet);
TRACE_LEAVE(QUIC_EV_CONN_LPKT, qc->conn, pkt);
TRACE_LEAVE(QUIC_EV_CONN_LPKT, qc ? qc->conn : NULL, pkt);
return pkt->len;