mirror of
https://gitea.invidious.io/iv-org/litespeed-quic.git
synced 2024-08-15 00:53:43 +00:00
Release 2.27.3
- [BUGFIX] gQUIC: do not destroy critical streams when connection is closed. See issue #201. - [BUGFIX] Drop #if LSQUIC_CONN_STATS from lsquic.h. See issue #211. - [BUGFIX] Challenge cancellation when path validation fails. - [BUGFIX] Do not send FIN if RST is scheduled to be sent on a stream. - [BUGFIX] gQUIC's is_tickable() when connection is closing. - [BUGFIX] Q050 processing of GOAWAY frames.
This commit is contained in:
parent
1a0003e3b9
commit
e2c4907022
10 changed files with 85 additions and 54 deletions
|
@ -331,7 +331,9 @@ static const struct conn_iface our_conn_if =
|
|||
};
|
||||
|
||||
|
||||
#if LSQUIC_CONN_STATS
|
||||
static struct conn_stats s_conn_stats;
|
||||
#endif
|
||||
|
||||
static void
|
||||
init_test_objs (struct test_objs *tobjs, unsigned initial_conn_window,
|
||||
|
@ -361,7 +363,9 @@ init_test_objs (struct test_objs *tobjs, unsigned initial_conn_window,
|
|||
tobjs->conn_pub.packet_out_malo =
|
||||
lsquic_malo_create(sizeof(struct lsquic_packet_out));
|
||||
tobjs->conn_pub.path = &network_path;
|
||||
#if LSQUIC_CONN_STATS
|
||||
tobjs->conn_pub.conn_stats = &s_conn_stats;
|
||||
#endif
|
||||
tobjs->initial_stream_window = initial_stream_window;
|
||||
tobjs->eng_pub.enp_settings.es_cc_algo = 1; /* Cubic */
|
||||
tobjs->eng_pub.enp_hsi_if = &tobjs->hsi_if;
|
||||
|
|
|
@ -174,7 +174,9 @@ static const struct conn_iface our_conn_if =
|
|||
|
||||
static struct http1x_ctor_ctx ctor_ctx = { .is_server = 0, };
|
||||
|
||||
#if LSQUIC_CONN_STATS
|
||||
static struct conn_stats s_conn_stats;
|
||||
#endif
|
||||
|
||||
static void
|
||||
init_test_objs (struct test_objs *tobjs, unsigned initial_conn_window,
|
||||
|
@ -204,7 +206,9 @@ init_test_objs (struct test_objs *tobjs, unsigned initial_conn_window,
|
|||
tobjs->conn_pub.packet_out_malo =
|
||||
lsquic_malo_create(sizeof(struct lsquic_packet_out));
|
||||
tobjs->conn_pub.path = &network_path;
|
||||
#if LSQUIC_CONN_STATS
|
||||
tobjs->conn_pub.conn_stats = &s_conn_stats;
|
||||
#endif
|
||||
tobjs->initial_stream_window = initial_stream_window;
|
||||
lsquic_send_ctl_init(&tobjs->send_ctl, &tobjs->alset, &tobjs->eng_pub,
|
||||
&tobjs->ver_neg, &tobjs->conn_pub, 0);
|
||||
|
|
|
@ -350,7 +350,9 @@ static const struct conn_iface our_conn_if =
|
|||
.ci_write_ack = write_ack,
|
||||
};
|
||||
|
||||
#if LSQUIC_CONN_STATS
|
||||
static struct conn_stats s_conn_stats;
|
||||
#endif
|
||||
|
||||
static void
|
||||
init_test_objs (struct test_objs *tobjs, unsigned initial_conn_window,
|
||||
|
@ -381,7 +383,9 @@ init_test_objs (struct test_objs *tobjs, unsigned initial_conn_window,
|
|||
tobjs->conn_pub.packet_out_malo =
|
||||
lsquic_malo_create(sizeof(struct lsquic_packet_out));
|
||||
tobjs->conn_pub.path = &network_path;
|
||||
#if LSQUIC_CONN_STATS
|
||||
tobjs->conn_pub.conn_stats = &s_conn_stats;
|
||||
#endif
|
||||
tobjs->initial_stream_window = initial_stream_window;
|
||||
lsquic_send_ctl_init(&tobjs->send_ctl, &tobjs->alset, &tobjs->eng_pub,
|
||||
&tobjs->ver_neg, &tobjs->conn_pub, 0);
|
||||
|
@ -801,8 +805,15 @@ test_rem_data_loc_close_and_rst_in (struct test_objs *tobjs)
|
|||
s = lsquic_stream_shutdown(stream, 1);
|
||||
assert(0 == s);
|
||||
|
||||
assert(1 == lsquic_send_ctl_n_scheduled(&tobjs->send_ctl)); /* Shutdown performs a flush */
|
||||
assert(stream->n_unacked == 1);
|
||||
if (stream->sm_bflags & SMBF_IETF)
|
||||
{
|
||||
assert(1 == lsquic_send_ctl_n_scheduled(&tobjs->send_ctl)); /* Shutdown performs a flush */
|
||||
assert(stream->n_unacked == 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* gQUIC has RST scheduled to be sent, so no FIN is written */
|
||||
}
|
||||
|
||||
assert(!TAILQ_EMPTY(&tobjs->conn_pub.service_streams));
|
||||
assert((stream->sm_qflags & (SMQF_SERVICE_FLAGS)) == SMQF_CALL_ONCLOSE);
|
||||
|
@ -820,12 +831,20 @@ test_rem_data_loc_close_and_rst_in (struct test_objs *tobjs)
|
|||
assert(stream->sm_qflags & SMQF_CALL_ONCLOSE);
|
||||
|
||||
lsquic_stream_rst_frame_sent(stream);
|
||||
stream->n_unacked++; /* RESET frame take a reference */
|
||||
assert(!(stream->sm_qflags & SMQF_FREE_STREAM)); /* Not yet,
|
||||
because: */ assert(stream->n_unacked == 2);
|
||||
if (stream->sm_bflags & SMBF_IETF)
|
||||
{
|
||||
stream->n_unacked++; /* RESET frame take a reference */
|
||||
assert(!(stream->sm_qflags & SMQF_FREE_STREAM)); /* Not yet,
|
||||
because: */ assert(stream->n_unacked == 2);
|
||||
}
|
||||
|
||||
lsquic_stream_acked(stream, QUIC_FRAME_STREAM);
|
||||
lsquic_stream_acked(stream, QUIC_FRAME_RST_STREAM);
|
||||
if (stream->sm_bflags & SMBF_IETF)
|
||||
{
|
||||
lsquic_stream_acked(stream, QUIC_FRAME_STREAM);
|
||||
lsquic_stream_acked(stream, QUIC_FRAME_RST_STREAM);
|
||||
}
|
||||
else
|
||||
assert(stream->n_unacked == 0); /* STREAM frame was elided */
|
||||
assert(stream->sm_qflags & SMQF_FREE_STREAM); /* OK, now */
|
||||
|
||||
lsquic_stream_destroy(stream);
|
||||
|
@ -869,13 +888,15 @@ test_rem_data_loc_close (struct test_objs *tobjs)
|
|||
s = lsquic_stream_shutdown(stream, 1);
|
||||
assert(0 == s);
|
||||
|
||||
assert(1 == lsquic_send_ctl_n_scheduled(&tobjs->send_ctl)); /* Shutdown performs a flush */
|
||||
if (stream->sm_bflags & SMBF_IETF)
|
||||
assert(1 == lsquic_send_ctl_n_scheduled(&tobjs->send_ctl)); /* Shutdown performs a flush */
|
||||
|
||||
assert(!TAILQ_EMPTY(&tobjs->conn_pub.service_streams));
|
||||
assert(stream->sm_qflags & SMQF_CALL_ONCLOSE);
|
||||
|
||||
assert(!(stream->sm_qflags & SMQF_FREE_STREAM));
|
||||
lsquic_stream_acked(stream, QUIC_FRAME_STREAM);
|
||||
if (stream->sm_bflags & SMBF_IETF)
|
||||
lsquic_stream_acked(stream, QUIC_FRAME_STREAM);
|
||||
|
||||
lsquic_stream_rst_frame_sent(stream);
|
||||
stream->n_unacked++; /* RESET frame take a reference */
|
||||
|
@ -1225,8 +1246,11 @@ test_loc_RST_rem_FIN (struct test_objs *tobjs)
|
|||
++stream->n_unacked; /* Fake sending of packet with RST_STREAM */
|
||||
assert(!TAILQ_EMPTY(&tobjs->conn_pub.sending_streams));
|
||||
assert((stream->sm_qflags & SMQF_SENDING_FLAGS) == SMQF_SEND_RST);
|
||||
sss = lsquic_stream_sending_state(stream);
|
||||
assert(SSS_DATA_SENT == sss); /* FIN was packetized */
|
||||
if (stream->sm_bflags & SMBF_IETF)
|
||||
{
|
||||
sss = lsquic_stream_sending_state(stream);
|
||||
assert(SSS_DATA_SENT == sss); /* FIN was packetized */
|
||||
}
|
||||
|
||||
s = lsquic_stream_frame_in(stream, new_frame_in(tobjs, 0, 90, 1));
|
||||
assert(s == 0);
|
||||
|
@ -1246,8 +1270,12 @@ test_loc_RST_rem_FIN (struct test_objs *tobjs)
|
|||
assert(TAILQ_EMPTY(&tobjs->conn_pub.sending_streams));
|
||||
|
||||
lsquic_stream_call_on_close(stream);
|
||||
assert(TAILQ_EMPTY(&tobjs->conn_pub.service_streams)); /* Not acked yet */
|
||||
lsquic_stream_acked(stream, QUIC_FRAME_STREAM);
|
||||
|
||||
if (stream->sm_bflags & SMBF_IETF)
|
||||
{
|
||||
assert(TAILQ_EMPTY(&tobjs->conn_pub.service_streams)); /* Not acked yet */
|
||||
lsquic_stream_acked(stream, QUIC_FRAME_STREAM);
|
||||
}
|
||||
|
||||
assert(!TAILQ_EMPTY(&tobjs->conn_pub.service_streams));
|
||||
assert((stream->sm_qflags & SMQF_SERVICE_FLAGS) == SMQF_FREE_STREAM);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue