Skip to content

Commit

Permalink
Release 2.29.5
Browse files Browse the repository at this point in the history
- Fix a few issues detected by h3spec for better compliance with HTTP/3 standard.
  • Loading branch information
gwanglst committed Mar 17, 2021
1 parent e1b8f1a commit 10e0dad
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 14 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2021-03-17
- 2.29.5
- Fix a few issues detected by h3spec for better compliance with HTTP/3
standard.

2021-03-08
- 2.29.4
- [BUGFIX] Infinite loop in stream: returned HQ frame can be at any
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# The short X.Y version
version = u'2.29'
# The full version, including alpha/beta/rc tags
release = u'2.29.4'
release = u'2.29.5'


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion include/lsquic.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extern "C" {

#define LSQUIC_MAJOR_VERSION 2
#define LSQUIC_MINOR_VERSION 29
#define LSQUIC_PATCH_VERSION 4
#define LSQUIC_PATCH_VERSION 5

/**
* Engine flags:
Expand Down
33 changes: 23 additions & 10 deletions src/liblsquic/lsquic_full_conn_ietf.c
Original file line number Diff line number Diff line change
Expand Up @@ -6393,6 +6393,13 @@ process_new_token_frame (struct ietf_full_conn *conn,
return 0;
}

if (conn->ifc_flags & IFC_SERVER)
{ /* [draft-ietf-quic-transport-34] Section 19.7 */
ABORT_QUIETLY(0, TEC_PROTOCOL_VIOLATION,
"received unexpected NEW_TOKEN frame");
return 0;
}

if (LSQ_LOG_ENABLED(LSQ_LOG_DEBUG)
|| LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT))
{
Expand Down Expand Up @@ -6858,17 +6865,22 @@ parse_regular_packet (struct ietf_full_conn *conn,
p = packet_in->pi_data + packet_in->pi_header_sz;
pend = packet_in->pi_data + packet_in->pi_data_sz;

while (p < pend)
{
len = process_packet_frame(conn, packet_in, p, pend - p);
if (len > 0)
p += len;
else
if (p < pend)
do
{
ABORT_ERROR("Error parsing frame");
break;
len = process_packet_frame(conn, packet_in, p, pend - p);
if (len > 0)
p += len;
else
{
ABORT_ERROR("Error parsing frame");
break;
}
}
}
while (p < pend);
else
ABORT_QUIETLY(0, TEC_PROTOCOL_VIOLATION,
"packet %"PRIu64" has no frames", packet_in->pi_packno);
}


Expand Down Expand Up @@ -8959,7 +8971,8 @@ on_settings_frame (void *ctx)
LSQ_DEBUG("SETTINGS frame");
if (conn->ifc_flags & IFC_HAVE_PEER_SET)
{
ABORT_WARN("second incoming SETTING frame on HTTP control stream");
ABORT_QUIETLY(1, HEC_FRAME_UNEXPECTED,
"second incoming SETTING frame on HTTP control stream");
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/liblsquic/lsquic_qdec_hdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ qdh_read_encoder_stream (void *ctx, const unsigned char *buf, size_t sz,
LSQ_INFO("error reading encoder stream");
qerr = lsqpack_dec_get_err_info(&qdh->qdh_decoder);
qdh->qdh_conn->cn_if->ci_abort_error(qdh->qdh_conn, 1,
HEC_QPACK_DECODER_STREAM_ERROR, "Error interpreting QPACK encoder "
HEC_QPACK_ENCODER_STREAM_ERROR, "Error interpreting QPACK encoder "
"stream; offset %"PRIu64", line %d", qerr->off, qerr->line);
goto end;
}
Expand Down
2 changes: 1 addition & 1 deletion src/liblsquic/lsquic_trans_params.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ static const uint64_t max_vals[MAX_NUMERIC_TPI + 1] =
* it is not required by the spec and is not necessary.
*/
[TPI_MAX_UDP_PAYLOAD_SIZE] = VINT_MAX_VALUE,
[TPI_ACK_DELAY_EXPONENT] = VINT_MAX_VALUE,
[TPI_ACK_DELAY_EXPONENT] = TP_MAX_ACK_DELAY_EXP,
[TPI_INIT_MAX_STREAMS_UNI] = 1ull << 60,
[TPI_INIT_MAX_STREAMS_BIDI] = 1ull << 60,
[TPI_INIT_MAX_DATA] = VINT_MAX_VALUE,
Expand Down
3 changes: 3 additions & 0 deletions src/liblsquic/lsquic_trans_params.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ struct transport_params
#define TP_DEF_MAX_ACK_DELAY 25u
#define TP_DEF_ACTIVE_CONNECTION_ID_LIMIT 2

/* [draft-ietf-quic-transport-34], Section 18.2 */
#define TP_MAX_ACK_DELAY_EXP 20

/* [draft-ietf-quic-transport-18], Section 18.1 */
#define TP_MAX_MAX_ACK_DELAY ((1u << 14) - 1)

Expand Down

0 comments on commit 10e0dad

Please sign in to comment.