if (h2s_mws(h2s) >= 0 && h2s_mws(h2s) + inc < 0) {
error = H2_ERR_FLOW_CONTROL_ERROR;
+ HA_ATOMIC_ADD(&h2c->px_counters->strm_proto_err, 1);
goto strm_err;
}
if (h2_get_n32(&h2c->dbuf, 0) == h2c->dsi) {
/* 7540#5.3 : can't depend on itself */
h2c_error(h2c, H2_ERR_PROTOCOL_ERROR);
- HA_ATOMIC_ADD(&h2c->px_counters->strm_proto_err, 1);
+ HA_ATOMIC_ADD(&h2c->px_counters->conn_proto_err, 1);
TRACE_DEVEL("leaving on error", H2_EV_RX_FRAME|H2_EV_RX_PRIO, h2c->conn);
return 0;
}
/* RFC7540#5.1 */
h2s_error(h2s, H2_ERR_STREAM_CLOSED);
h2c->st0 = H2_CS_FRAME_E;
+ HA_ATOMIC_ADD(&h2c->px_counters->strm_proto_err, 1);
goto fail;
}
/* only log if no other stream can report the error */
sess_log(h2c->conn->owner);
}
- HA_ATOMIC_ADD(&h2c->px_counters->strm_proto_err, 1);
+ HA_ATOMIC_ADD(&h2c->px_counters->conn_proto_err, 1);
TRACE_DEVEL("leaving in error (idle&!hdrs&!prio)", H2_EV_RX_FRAME|H2_EV_RX_FHDR|H2_EV_PROTO_ERR, h2c->conn, h2s);
return 0;
}
if (h2s->st == H2_SS_IDLE && (h2c->flags & H2_CF_IS_BACK)) {
/* only PUSH_PROMISE would be permitted here */
h2c_error(h2c, H2_ERR_PROTOCOL_ERROR);
- HA_ATOMIC_ADD(&h2c->px_counters->strm_proto_err, 1);
+ HA_ATOMIC_ADD(&h2c->px_counters->conn_proto_err, 1);
TRACE_DEVEL("leaving in error (idle&back)", H2_EV_RX_FRAME|H2_EV_RX_FHDR|H2_EV_PROTO_ERR, h2c->conn, h2s);
return 0;
}
*/
if (h2_ft_bit(h2c->dft) & H2_FT_HDR_MASK) {
h2c_error(h2c, H2_ERR_PROTOCOL_ERROR);
- HA_ATOMIC_ADD(&h2c->px_counters->strm_proto_err, 1);
+ HA_ATOMIC_ADD(&h2c->px_counters->conn_proto_err, 1);
}
else {
h2s_error(h2s, H2_ERR_STREAM_CLOSED);
/* only log if no other stream can report the error */
sess_log(h2c->conn->owner);
}
+ HA_ATOMIC_ADD(&h2c->px_counters->conn_proto_err, 1);
break;
}
h2c_error(h2c, H2_ERR_FRAME_SIZE_ERROR);
if (!(h2c->flags & H2_CF_IS_BACK))
sess_log(h2c->conn->owner);
+ HA_ATOMIC_ADD(&h2c->px_counters->conn_proto_err, 1);
goto fail;
}
hdr.len--;
h2c_error(h2c, H2_ERR_PROTOCOL_ERROR);
if (!(h2c->flags & H2_CF_IS_BACK))
sess_log(h2c->conn->owner);
- HA_ATOMIC_ADD(&h2c->px_counters->strm_proto_err, 1);
+ HA_ATOMIC_ADD(&h2c->px_counters->conn_proto_err, 1);
goto fail;
}
h2c_error(h2c, ret);
if (!(h2c->flags & H2_CF_IS_BACK))
sess_log(h2c->conn->owner);
+ HA_ATOMIC_ADD(&h2c->px_counters->conn_proto_err, 1);
goto fail;
}
}
h2c_error(h2c, H2_ERR_PROTOCOL_ERROR);
if (!(h2c->flags & H2_CF_IS_BACK))
sess_log(h2c->conn->owner);
- HA_ATOMIC_ADD(&h2c->px_counters->strm_proto_err, 1);
+ HA_ATOMIC_ADD(&h2c->px_counters->conn_proto_err, 1);
goto fail;
case H2_FT_HEADERS:
/* RFC7540#6.10: frame of unexpected type */
TRACE_STATE("not continuation!", H2_EV_RX_FRAME|H2_EV_RX_FHDR|H2_EV_RX_HDR|H2_EV_RX_CONT|H2_EV_H2C_ERR|H2_EV_PROTO_ERR, h2c->conn);
h2c_error(h2c, H2_ERR_PROTOCOL_ERROR);
- HA_ATOMIC_ADD(&h2c->px_counters->strm_proto_err, 1);
+ HA_ATOMIC_ADD(&h2c->px_counters->conn_proto_err, 1);
goto fail;
}
/* RFC7540#6.10: frame of different stream */
TRACE_STATE("different stream ID!", H2_EV_RX_FRAME|H2_EV_RX_FHDR|H2_EV_RX_HDR|H2_EV_RX_CONT|H2_EV_H2C_ERR|H2_EV_PROTO_ERR, h2c->conn);
h2c_error(h2c, H2_ERR_PROTOCOL_ERROR);
- HA_ATOMIC_ADD(&h2c->px_counters->strm_proto_err, 1);
+ HA_ATOMIC_ADD(&h2c->px_counters->conn_proto_err, 1);
goto fail;
}
/* RFC7540#5.3.1 : stream dep may not depend on itself */
TRACE_STATE("invalid stream dependency!", H2_EV_RX_FRAME|H2_EV_RX_HDR|H2_EV_H2C_ERR|H2_EV_PROTO_ERR, h2c->conn);
h2c_error(h2c, H2_ERR_PROTOCOL_ERROR);
- HA_ATOMIC_ADD(&h2c->px_counters->strm_proto_err, 1);
+ HA_ATOMIC_ADD(&h2c->px_counters->conn_proto_err, 1);
goto fail;
}
/* It's a trailer but it's missing ES flag */
TRACE_STATE("missing EH on trailers frame", H2_EV_RX_FRAME|H2_EV_RX_HDR|H2_EV_H2C_ERR|H2_EV_PROTO_ERR, h2c->conn);
h2c_error(h2c, H2_ERR_PROTOCOL_ERROR);
- HA_ATOMIC_ADD(&h2c->px_counters->strm_proto_err, 1);
+ HA_ATOMIC_ADD(&h2c->px_counters->conn_proto_err, 1);
goto fail;
}