Skip to content

Commit

Permalink
Release 2.10.6
Browse files Browse the repository at this point in the history
- [BUGFIX] HTTP/3 framing: don't misinterpret rare occurence as error.
- [BUGFIX] Send gap warning due to missing poisoned packet.
  • Loading branch information
Dmitri Tikhonov committed Feb 14, 2020
1 parent 35ac25b commit aa82021
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 13 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2020-02-14
- 2.10.6
- [BUGFIX] HTTP/3 framing: don't misinterpret rare occurence as error.
- [BUGFIX] Send gap warning due to missing poisoned packet.
- Stream unit test for scenario in issue #106.

2020-02-13
- 2.10.5
- [BUGFIX] BBR: call cci_sent() with correct arguments and at correct
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 10
#define LSQUIC_PATCH_VERSION 5
#define LSQUIC_PATCH_VERSION 6

/**
* Engine flags:
Expand Down
2 changes: 1 addition & 1 deletion src/liblsquic/lsquic_send_ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ lsquic_send_ctl_sent_packet (lsquic_send_ctl_t *ctl,
assert(!(packet_out->po_flags & PO_ENCRYPTED));
ctl->sc_last_sent_time = packet_out->po_sent;
pns = lsquic_packet_out_pns(packet_out);
if (packet_out->po_packno == ctl->sc_gap + 1 && pns == PNS_APP)
if (packet_out->po_packno == ctl->sc_gap + 1)
{
assert(!(ctl->sc_flags & SC_POISON));
lsquic_senhist_add(&ctl->sc_senhist, ctl->sc_gap);
Expand Down
8 changes: 2 additions & 6 deletions src/liblsquic/lsquic_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -3021,12 +3021,8 @@ maybe_close_varsize_hq_frame (struct lsquic_stream *stream)
}
}
else if (!shf->shf_frame_ptr)
{
LSQ_ERROR("dangling HTTP/3 frame, on stream %"PRIu64, stream->id);
stream->conn_pub->lconn->cn_if->ci_internal_error(
stream->conn_pub->lconn, "dangling HTTP/3 frame");
stream_hq_frame_put(stream, shf);
}
LSQ_DEBUG("HQ frame of type 0x%X has not yet been written, not "
"closing", shf->shf_frame_type);
else
{
assert(stream->sm_n_buffered);
Expand Down
20 changes: 15 additions & 5 deletions test/unittests/test_h3_framing.c
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,8 @@ fuzz_guided_testing (const char *input)


static void
test_frame_header_split (unsigned n_packets)
test_frame_header_split (unsigned n_packets, unsigned extra_sz,
int add_one_more)
{
struct test_objs tobjs;
struct lsquic_stream *stream;
Expand Down Expand Up @@ -771,7 +772,7 @@ test_frame_header_split (unsigned n_packets)
const size_t pad_size = packet_out->po_n_alloc
- 2 /* STREAM header */
- 5 /* 3-byte HEADERS frame */
- 2;
- extra_sz;
packet_out->po_data_sz = pad_size;
lsquic_send_ctl_scheduled_one(&tobjs.send_ctl, packet_out);

Expand All @@ -784,6 +785,12 @@ test_frame_header_split (unsigned n_packets)
assert(w >= 0 && (size_t) w == buf_in_sz);
lsquic_stream_flush(stream);

if (add_one_more)
{
++g_ctl_settings.tcs_can_send;
lsquic_stream_flush(stream);
}

/* Verify written data: */
nw = read_from_scheduled_packets(&tobjs.send_ctl, 0, buf_out, buf_out_sz,
0, &fin, 1);
Expand Down Expand Up @@ -953,7 +960,8 @@ int
main (int argc, char **argv)
{
const char *fuzz_input = NULL;
int opt;
int opt, add_one_more;
unsigned n_packets, extra_sz;

lsquic_global_init(LSQUIC_GLOBAL_SERVER);

Expand All @@ -980,8 +988,10 @@ main (int argc, char **argv)
else
{
main_test_hq_framing();
test_frame_header_split(1);
test_frame_header_split(2);
for (n_packets = 1; n_packets <= 2; ++n_packets)
for (extra_sz = 0; extra_sz <= 2; ++extra_sz)
for (add_one_more = 0; add_one_more <= 1; ++add_one_more)
test_frame_header_split(n_packets, extra_sz, add_one_more);
test_zero_size_frame();
}

Expand Down

0 comments on commit aa82021

Please sign in to comment.