mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-23 14:16:53 +00:00
BUG/MINOR: quic: Possible crash in quic_conn_prx_cntrs_update()
quic_conn_prx_cntrs_update() may be called from quic_conn_release() with NULL as value for ->prx_counters member. This is the case when qc_new_conn() fails when allocating <buf_area>. In this case quic_conn_prx_cntrs_update() BUG_ON(). Must be backported as far as 2.7.
This commit is contained in:
parent
d66896036a
commit
c02d898cd1
@ -5716,7 +5716,9 @@ static struct quic_conn *qc_new_conn(const struct quic_version *qv, int ipv4,
|
||||
/* Update the proxy counters of <qc> QUIC connection from its counters */
|
||||
static inline void quic_conn_prx_cntrs_update(struct quic_conn *qc)
|
||||
{
|
||||
BUG_ON(!qc->prx_counters);
|
||||
if (!qc->prx_counters)
|
||||
return;
|
||||
|
||||
HA_ATOMIC_ADD(&qc->prx_counters->dropped_pkt, qc->cntrs.dropped_pkt);
|
||||
HA_ATOMIC_ADD(&qc->prx_counters->dropped_pkt_bufoverrun, qc->cntrs.dropped_pkt_bufoverrun);
|
||||
HA_ATOMIC_ADD(&qc->prx_counters->dropped_parsing, qc->cntrs.dropped_parsing);
|
||||
|
Loading…
Reference in New Issue
Block a user