mirror of
https://gitea.invidious.io/iv-org/litespeed-quic.git
synced 2024-08-15 00:53:43 +00:00
Release 2.15.0
- [FEATURE] QUIC and HTTP/3 Internet Draft 28 support. - [BUGFIX] Ignore Retry packets after other packets are decrypted successfully. - [BUGFIX] Transport parameter decoding: CID no longer has 4-byte length minimum. - http_client: fix and optimize lsxpack_header allocator. - Drop support for Internet Draft 25.
This commit is contained in:
parent
4d221313f7
commit
fb73393fef
33 changed files with 1124 additions and 631 deletions
|
@ -179,7 +179,7 @@ run_test (const struct test *test)
|
|||
size_t sz;
|
||||
unsigned char buf[0x1000];
|
||||
|
||||
pf = select_pf_by_ver(LSQVER_ID25);
|
||||
pf = select_pf_by_ver(LSQVER_ID27);
|
||||
if (!test->skip_gen)
|
||||
{
|
||||
rechist.acki = &test->acki;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
static struct lsquic_conn lconn = LSCONN_INITIALIZER_CIDLEN(lconn, 0);
|
||||
|
||||
static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_ID25);
|
||||
static const struct parse_funcs *const pf = select_pf_by_ver(LSQVER_ID27);
|
||||
|
||||
|
||||
static void
|
||||
|
|
|
@ -33,7 +33,7 @@ struct test {
|
|||
static const struct test tests[] = {
|
||||
|
||||
{ .lineno = __LINE__,
|
||||
.pf = select_pf_by_ver(LSQVER_ID25),
|
||||
.pf = select_pf_by_ver(LSQVER_ID27),
|
||||
.offset = 0,
|
||||
.data_sz = 10,
|
||||
.data = "0123456789",
|
||||
|
@ -49,7 +49,7 @@ static const struct test tests[] = {
|
|||
},
|
||||
|
||||
{ .lineno = __LINE__,
|
||||
.pf = select_pf_by_ver(LSQVER_ID25),
|
||||
.pf = select_pf_by_ver(LSQVER_ID27),
|
||||
.offset = 500,
|
||||
.data_sz = 10,
|
||||
.data = "0123456789",
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
#include "lsquic_hq.h"
|
||||
#include "lsquic_data_in_if.h"
|
||||
|
||||
static const struct parse_funcs *g_pf = select_pf_by_ver(LSQVER_ID25);
|
||||
static const struct parse_funcs *g_pf = select_pf_by_ver(LSQVER_ID27);
|
||||
|
||||
struct test_ctl_settings
|
||||
{
|
||||
|
@ -302,7 +302,7 @@ init_test_objs (struct test_objs *tobjs, unsigned initial_conn_window,
|
|||
memset(tobjs, 0, sizeof(*tobjs));
|
||||
LSCONN_INITIALIZE(&tobjs->lconn);
|
||||
tobjs->lconn.cn_pf = g_pf;
|
||||
tobjs->lconn.cn_version = LSQVER_ID25;
|
||||
tobjs->lconn.cn_version = LSQVER_ID27;
|
||||
tobjs->lconn.cn_esf_c = &lsquic_enc_session_common_ietf_v1;
|
||||
network_path.np_pack_size = packet_sz;
|
||||
tobjs->lconn.cn_if = &our_conn_if;
|
||||
|
|
|
@ -161,8 +161,8 @@ init_test_objs (struct test_objs *tobjs, unsigned initial_conn_window,
|
|||
int s;
|
||||
memset(tobjs, 0, sizeof(*tobjs));
|
||||
LSCONN_INITIALIZE(&tobjs->lconn);
|
||||
tobjs->lconn.cn_pf = select_pf_by_ver(LSQVER_ID25);
|
||||
tobjs->lconn.cn_version = LSQVER_ID25;
|
||||
tobjs->lconn.cn_pf = select_pf_by_ver(LSQVER_ID27);
|
||||
tobjs->lconn.cn_version = LSQVER_ID27;
|
||||
tobjs->lconn.cn_esf_c = &lsquic_enc_session_common_ietf_v1;
|
||||
network_path.np_pack_size = IQUIC_MAX_IPv4_PACKET_SZ;
|
||||
tobjs->lconn.cn_if = &our_conn_if;
|
||||
|
|
|
@ -325,7 +325,7 @@ init_test_objs (struct test_objs *tobjs, unsigned initial_conn_window,
|
|||
LSCONN_INITIALIZE(&tobjs->lconn);
|
||||
tobjs->lconn.cn_pf = pf ? pf : g_pf;
|
||||
tobjs->lconn.cn_version = tobjs->lconn.cn_pf == &lsquic_parse_funcs_ietf_v1 ?
|
||||
LSQVER_ID25 : LSQVER_043;
|
||||
LSQVER_ID27 : LSQVER_043;
|
||||
tobjs->lconn.cn_esf_c = &lsquic_enc_session_common_gquic_1;
|
||||
network_path.np_pack_size = 1370;
|
||||
tobjs->lconn.cn_if = &our_conn_if;
|
||||
|
@ -2243,7 +2243,7 @@ test_changing_pack_size (void)
|
|||
enum lsquic_version versions_to_test[3] =
|
||||
{
|
||||
LSQVER_046,
|
||||
LSQVER_ID25,
|
||||
LSQVER_ID27,
|
||||
};
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
|
@ -3173,7 +3173,7 @@ main (int argc, char **argv)
|
|||
|
||||
/* Redo some tests using crypto streams and frames */
|
||||
g_use_crypto_ctor = 1;
|
||||
g_pf = select_pf_by_ver(LSQVER_ID25);
|
||||
g_pf = select_pf_by_ver(LSQVER_ID27);
|
||||
main_test_packetization();
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -279,7 +279,7 @@ static const struct test tests[] = {
|
|||
*/
|
||||
|
||||
{ .lineno = __LINE__,
|
||||
.pf = select_pf_by_ver(LSQVER_ID25),
|
||||
.pf = select_pf_by_ver(LSQVER_ID27),
|
||||
.fin = { 0, 1, },
|
||||
.offset = 0x0807060504030201UL,
|
||||
.stream_id = 0x210,
|
||||
|
@ -299,7 +299,7 @@ static const struct test tests[] = {
|
|||
},
|
||||
|
||||
{ .lineno = __LINE__,
|
||||
.pf = select_pf_by_ver(LSQVER_ID25),
|
||||
.pf = select_pf_by_ver(LSQVER_ID27),
|
||||
.fin = { 0, 0, },
|
||||
.offset = 0,
|
||||
.stream_id = 0x210,
|
||||
|
@ -318,7 +318,7 @@ static const struct test tests[] = {
|
|||
},
|
||||
|
||||
{ .lineno = __LINE__,
|
||||
.pf = select_pf_by_ver(LSQVER_ID25),
|
||||
.pf = select_pf_by_ver(LSQVER_ID27),
|
||||
.fin = { 0, 0, },
|
||||
.offset = 0,
|
||||
.stream_id = 0x21,
|
||||
|
@ -336,7 +336,7 @@ static const struct test tests[] = {
|
|||
},
|
||||
|
||||
{ .lineno = __LINE__,
|
||||
.pf = select_pf_by_ver(LSQVER_ID25),
|
||||
.pf = select_pf_by_ver(LSQVER_ID27),
|
||||
.fin = { 0, 0, },
|
||||
.offset = 0x0807060504030201UL,
|
||||
.stream_id = 0x210,
|
||||
|
@ -356,7 +356,7 @@ static const struct test tests[] = {
|
|||
},
|
||||
|
||||
{ .lineno = __LINE__,
|
||||
.pf = select_pf_by_ver(LSQVER_ID25),
|
||||
.pf = select_pf_by_ver(LSQVER_ID27),
|
||||
.fin = { 1, 0, },
|
||||
.offset = 0x0807060504030201UL,
|
||||
.stream_id = 0x210,
|
||||
|
@ -374,7 +374,7 @@ static const struct test tests[] = {
|
|||
},
|
||||
|
||||
{ .lineno = __LINE__,
|
||||
.pf = select_pf_by_ver(LSQVER_ID25),
|
||||
.pf = select_pf_by_ver(LSQVER_ID27),
|
||||
.fin = { 1, 0, },
|
||||
.offset = 0x0807060504030201UL,
|
||||
.stream_id = 0x210,
|
||||
|
|
|
@ -243,7 +243,7 @@ static const struct test tests[] = {
|
|||
|
||||
{ "Balls to the wall: every possible bit is set",
|
||||
__LINE__,
|
||||
select_pf_by_ver(LSQVER_ID25),
|
||||
select_pf_by_ver(LSQVER_ID27),
|
||||
/* TYPE OFF DLEN FIN */
|
||||
{ 0x10 | 1<<2 | 1<<1 | 1<<0,
|
||||
0x41, 0x23, /* Stream ID */
|
||||
|
@ -262,7 +262,7 @@ static const struct test tests[] = {
|
|||
|
||||
{ "Balls to the wall #2: every possible bit is set except FIN",
|
||||
__LINE__,
|
||||
select_pf_by_ver(LSQVER_ID25),
|
||||
select_pf_by_ver(LSQVER_ID27),
|
||||
/* TYPE OFF DLEN FIN */
|
||||
{ 0x10 | 1<<2 | 1<<1 | 0<<0,
|
||||
0x81, 0x23, 0x00, 0xE4, /* Stream ID */
|
||||
|
@ -281,7 +281,7 @@ static const struct test tests[] = {
|
|||
|
||||
{ "Data length is zero",
|
||||
__LINE__,
|
||||
select_pf_by_ver(LSQVER_ID25),
|
||||
select_pf_by_ver(LSQVER_ID27),
|
||||
/* TYPE OFF DLEN FIN */
|
||||
{ 0x10 | 1<<2 | 0<<1 | 0<<0,
|
||||
0x81, 0x23, 0x00, 0xE4, /* Stream ID */
|
||||
|
@ -299,7 +299,7 @@ static const struct test tests[] = {
|
|||
|
||||
{ "Sanity check: what happens when data length is zero #1",
|
||||
__LINE__,
|
||||
select_pf_by_ver(LSQVER_ID25),
|
||||
select_pf_by_ver(LSQVER_ID27),
|
||||
/* TYPE OFF DLEN FIN */
|
||||
{ 0x10 | 1<<2 | 1<<1 | 0<<0,
|
||||
0x81, 0x23, 0x00, 0xE4, /* Stream ID */
|
||||
|
@ -318,7 +318,7 @@ static const struct test tests[] = {
|
|||
|
||||
{ "Sanity check: what happens when data length is zero #2",
|
||||
__LINE__,
|
||||
select_pf_by_ver(LSQVER_ID25),
|
||||
select_pf_by_ver(LSQVER_ID27),
|
||||
/* TYPE OFF DLEN FIN */
|
||||
{ 0x10 | 1<<2 | 1<<1 | 0<<0,
|
||||
0x81, 0x23, 0x00, 0xE4, /* Stream ID */
|
||||
|
@ -337,7 +337,7 @@ static const struct test tests[] = {
|
|||
|
||||
{ "Sanity check: what happens when data length is zero #3",
|
||||
__LINE__,
|
||||
select_pf_by_ver(LSQVER_ID25),
|
||||
select_pf_by_ver(LSQVER_ID27),
|
||||
/* TYPE OFF DLEN FIN */
|
||||
{ 0x10 | 0<<2 | 1<<1 | 0<<0,
|
||||
0x81, 0x23, 0x00, 0xE4, /* Stream ID */
|
||||
|
@ -355,7 +355,7 @@ static const struct test tests[] = {
|
|||
|
||||
{ "Sanity check: what happens when data length is zero #3",
|
||||
__LINE__,
|
||||
select_pf_by_ver(LSQVER_ID25),
|
||||
select_pf_by_ver(LSQVER_ID27),
|
||||
/* TYPE OFF DLEN FIN */
|
||||
{ 0x10 | 1<<2 | 1<<1 | 1<<0,
|
||||
0x81, 0x23, 0x00, 0xE4, /* Stream ID */
|
||||
|
@ -374,7 +374,7 @@ static const struct test tests[] = {
|
|||
|
||||
{ "Check data bounds #1",
|
||||
__LINE__,
|
||||
select_pf_by_ver(LSQVER_ID25),
|
||||
select_pf_by_ver(LSQVER_ID27),
|
||||
/* TYPE OFF DLEN FIN */
|
||||
{ 0x10 | 1<<2 | 1<<1 | 1<<0,
|
||||
0x81, 0x23, 0x00, 0xE4, /* Stream ID */
|
||||
|
@ -393,7 +393,7 @@ static const struct test tests[] = {
|
|||
|
||||
{ "Check data bounds #2",
|
||||
__LINE__,
|
||||
select_pf_by_ver(LSQVER_ID25),
|
||||
select_pf_by_ver(LSQVER_ID27),
|
||||
/* TYPE OFF DLEN FIN */
|
||||
{ 0x10 | 1<<2 | 1<<1 | 1<<0,
|
||||
0x81, 0x23, 0x00, 0xE4, /* Stream ID */
|
||||
|
|
|
@ -58,18 +58,20 @@ static const struct trapa_test tests[] =
|
|||
| (1 << TPI_INIT_MAX_DATA)
|
||||
| (1 << TPI_MAX_IDLE_TIMEOUT)
|
||||
| (1 << TPI_MAX_ACK_DELAY)
|
||||
| (1 << TPI_MAX_PACKET_SIZE)
|
||||
| (1 << TPI_MAX_UDP_PAYLOAD_SIZE)
|
||||
| (1 << TPI_ACK_DELAY_EXPONENT)
|
||||
| (1 << TPI_INITIAL_SOURCE_CID)
|
||||
| (1 << TPI_ACTIVE_CONNECTION_ID_LIMIT),
|
||||
.tp_init_max_stream_data_bidi_local = 0x12348877,
|
||||
.tp_init_max_data = 0xAABB,
|
||||
.tp_max_packet_size = 1213,
|
||||
.tp_max_udp_payload_size = 1213,
|
||||
.tp_max_idle_timeout = 10 * 1000,
|
||||
.tp_max_ack_delay = TP_DEF_MAX_ACK_DELAY,
|
||||
.tp_active_connection_id_limit = 7,
|
||||
.tp_initial_source_cid = { .len = 8, .u_cid.id = 0x0807060504030201ull, },
|
||||
},
|
||||
.is_server = 0,
|
||||
.enc_len = 26,
|
||||
.enc_len = 36,
|
||||
.encoded =
|
||||
/* Idle timeout */ "\x01\x02\x67\x10"
|
||||
/* Packet size */ "\x03\x02\x44\xBD"
|
||||
|
@ -77,6 +79,7 @@ static const struct trapa_test tests[] =
|
|||
/* Bidi local */ "\x05\x04\x92\x34\x88\x77"
|
||||
/* Ack delay exp */ "\x0A\x01\x00"
|
||||
/* Active CID limit */ "\x0E\x01\x07"
|
||||
/* Initial SCID */ "\x0F\x08\x01\x02\x03\x04\x05\x06\x07\x08"
|
||||
/* Trailer to make the end easily visible in gdb: */
|
||||
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
|
||||
},
|
||||
|
@ -104,7 +107,7 @@ static const struct trapa_test tests[] =
|
|||
TP_DEFAULT_VALUES,
|
||||
.tp_init_max_data = 0x123456,
|
||||
.tp_init_max_stream_data_bidi_local = 0xABCDEF88,
|
||||
.tp_max_packet_size = 0x555,
|
||||
.tp_max_udp_payload_size = 0x555,
|
||||
},
|
||||
.is_server = 1,
|
||||
.addl_set = 1 << TPI_DISABLE_ACTIVE_MIGRATION,
|
||||
|
@ -125,7 +128,7 @@ static const struct trapa_test tests[] =
|
|||
.params = {
|
||||
TP_DEFAULT_VALUES,
|
||||
.tp_max_ack_delay = 25,
|
||||
.tp_max_packet_size = 0x555,
|
||||
.tp_max_udp_payload_size = 0x555,
|
||||
.tp_preferred_address = {
|
||||
.ipv4_addr = "\x01\x02\x03\x04",
|
||||
.ipv4_port = 0x1234,
|
||||
|
@ -172,8 +175,8 @@ params_are_equal (const struct transport_params *a,
|
|||
&& a->tp_preferred_address.ipv4_port == b->tp_preferred_address.ipv4_port
|
||||
&& a->tp_preferred_address.ipv6_port == b->tp_preferred_address.ipv6_port
|
||||
&& a->tp_preferred_address.cid.len == b->tp_preferred_address.cid.len
|
||||
&& MCMP(tp_original_cid.idbuf)
|
||||
&& a->tp_original_cid.len == b->tp_original_cid.len
|
||||
&& MCMP(tp_original_dest_cid.idbuf)
|
||||
&& a->tp_original_dest_cid.len == b->tp_original_dest_cid.len
|
||||
;
|
||||
#undef MCMP
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue