mirror of
https://gitea.invidious.io/iv-org/litespeed-quic.git
synced 2024-08-15 00:53:43 +00:00
Release 2.14.2
- [BUGFIX] Use ls-qpack 2.0.4 - [BUGFIX] Honor max packet size on the client and when path changes. - http_server: fix prepare_decode() function.
This commit is contained in:
parent
77a28812de
commit
7ae4a10d41
7 changed files with 58 additions and 8 deletions
|
@ -1,3 +1,9 @@
|
|||
2020-04-08
|
||||
- 2.14.2
|
||||
- [BUGFIX] Use ls-qpack 2.0.4
|
||||
- [BUGFIX] Honor max packet size on the client and when path changes.
|
||||
- http_server: fix prepare_decode() function.
|
||||
|
||||
2020-04-07
|
||||
- 2.14.1
|
||||
- [BUGFIX] Place connections on tickable queue when sending is reenabled.
|
||||
|
|
|
@ -693,6 +693,16 @@ settings structure:
|
|||
|
||||
Default value is @ref LSQUIC_DF_TIMESTAMPS
|
||||
|
||||
.. member:: unsigned short es_max_packet_size_rx
|
||||
|
||||
Maximum packet size we are willing to receive. This is sent to
|
||||
peer in transport parameters: the library does not enforce this
|
||||
limit for incoming packets.
|
||||
|
||||
If set to zero, limit is not set.
|
||||
|
||||
Default value is :macro:`LSQUIC_DF_MAX_PACKET_SIZE_RX`
|
||||
|
||||
To initialize the settings structure to library defaults, use the following
|
||||
convenience function:
|
||||
|
||||
|
@ -867,6 +877,10 @@ out of date. Please check your :file:`lsquic.h` for actual values.*
|
|||
|
||||
Delayed ACKs are off by default.
|
||||
|
||||
.. macro:: LSQUIC_DF_MAX_PACKET_SIZE_RX
|
||||
|
||||
By default, incoming packet size is not limited.
|
||||
|
||||
Receiving Packets
|
||||
-----------------
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ author = u'LiteSpeed Technologies'
|
|||
# The short X.Y version
|
||||
version = u'2.14'
|
||||
# The full version, including alpha/beta/rc tags
|
||||
release = u'2.14.1'
|
||||
release = u'2.14.2'
|
||||
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
|
|
@ -25,7 +25,7 @@ extern "C" {
|
|||
|
||||
#define LSQUIC_MAJOR_VERSION 2
|
||||
#define LSQUIC_MINOR_VERSION 14
|
||||
#define LSQUIC_PATCH_VERSION 1
|
||||
#define LSQUIC_PATCH_VERSION 2
|
||||
|
||||
/**
|
||||
* Engine flags:
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 606208599650d51f03f26afd12625c62a1be7cbb
|
||||
Subproject commit 5b9001252447c26f861f4b1979c677272c7b541c
|
|
@ -333,7 +333,6 @@ struct ietf_full_conn
|
|||
const struct lsquic_engine_settings
|
||||
*ifc_settings;
|
||||
lsquic_conn_ctx_t *ifc_conn_ctx;
|
||||
struct transport_params ifc_peer_param;
|
||||
STAILQ_HEAD(, stream_id_to_ss)
|
||||
ifc_stream_ids_to_ss;
|
||||
lsquic_time_t ifc_created;
|
||||
|
@ -633,7 +632,8 @@ migra_is_on (const struct ietf_full_conn *conn)
|
|||
|
||||
static void
|
||||
migra_begin (struct ietf_full_conn *conn, struct conn_path *copath,
|
||||
struct dcid_elem *dce, const struct sockaddr *dest_sa)
|
||||
struct dcid_elem *dce, const struct sockaddr *dest_sa,
|
||||
const struct transport_params *params)
|
||||
{
|
||||
assert(!(migra_is_on(conn)));
|
||||
|
||||
|
@ -645,6 +645,11 @@ migra_begin (struct ietf_full_conn *conn, struct conn_path *copath,
|
|||
copath->cop_path.np_pack_size = IQUIC_MAX_IPv6_PACKET_SZ;
|
||||
else
|
||||
copath->cop_path.np_pack_size = IQUIC_MAX_IPv4_PACKET_SZ;
|
||||
if ((params->tp_set & (1 << TPI_MAX_PACKET_SIZE))
|
||||
&& params->tp_numerics[TPI_MAX_PACKET_SIZE]
|
||||
< copath->cop_path.np_pack_size)
|
||||
copath->cop_path.np_pack_size
|
||||
= params->tp_numerics[TPI_MAX_PACKET_SIZE];
|
||||
memcpy(&copath->cop_path.np_local_addr, NP_LOCAL_SA(CUR_NPATH(conn)),
|
||||
sizeof(copath->cop_path.np_local_addr));
|
||||
memcpy(&copath->cop_path.np_peer_addr, dest_sa,
|
||||
|
@ -2895,7 +2900,7 @@ begin_migra_or_retire_cid (struct ietf_full_conn *conn,
|
|||
copath = &conn->ifc_paths[1];
|
||||
assert(!(conn->ifc_used_paths & (1 << (copath - conn->ifc_paths))));
|
||||
|
||||
migra_begin(conn, copath, dce, (struct sockaddr *) &sockaddr);
|
||||
migra_begin(conn, copath, dce, (struct sockaddr *) &sockaddr, params);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -3059,7 +3064,15 @@ handshake_ok (struct lsquic_conn *lconn)
|
|||
|
||||
conn->ifc_max_peer_ack_usec = params->tp_max_ack_delay * 1000;
|
||||
|
||||
/* TODO: packet size */
|
||||
if ((params->tp_set & (1 << TPI_MAX_PACKET_SIZE))
|
||||
&& params->tp_numerics[TPI_MAX_PACKET_SIZE]
|
||||
< CUR_NPATH(conn)->np_pack_size)
|
||||
{
|
||||
CUR_NPATH(conn)->np_pack_size
|
||||
= params->tp_numerics[TPI_MAX_PACKET_SIZE];
|
||||
LSQ_DEBUG("decrease packet size to %hu bytes",
|
||||
CUR_NPATH(conn)->np_pack_size);
|
||||
}
|
||||
|
||||
dce = get_new_dce(conn);
|
||||
if (!dce)
|
||||
|
@ -5652,6 +5665,8 @@ static int
|
|||
init_new_path (struct ietf_full_conn *conn, struct conn_path *path,
|
||||
int dcid_changed)
|
||||
{
|
||||
struct lsquic_conn *const lconn = &conn->ifc_conn;
|
||||
const struct transport_params *params;
|
||||
struct dcid_elem *dce;
|
||||
|
||||
dce = find_unassigned_dcid(conn);
|
||||
|
@ -5683,6 +5698,13 @@ init_new_path (struct ietf_full_conn *conn, struct conn_path *path,
|
|||
path->cop_path.np_pack_size = IQUIC_MAX_IPv6_PACKET_SZ;
|
||||
else
|
||||
path->cop_path.np_pack_size = IQUIC_MAX_IPv4_PACKET_SZ;
|
||||
params = lconn->cn_esf.i->esfi_get_peer_transport_params(
|
||||
lconn->cn_enc_session);
|
||||
if (params && (params->tp_set & (1 << TPI_MAX_PACKET_SIZE))
|
||||
&& params->tp_numerics[TPI_MAX_PACKET_SIZE]
|
||||
< path->cop_path.np_pack_size)
|
||||
path->cop_path.np_pack_size
|
||||
= params->tp_numerics[TPI_MAX_PACKET_SIZE];
|
||||
|
||||
LSQ_DEBUG("initialized path %u", (unsigned) (path - conn->ifc_paths));
|
||||
|
||||
|
|
|
@ -1290,12 +1290,20 @@ interop_server_hset_prepare_decode (void *hset_p, struct lsxpack_header *xhdr,
|
|||
}
|
||||
|
||||
if (req->flags & HAVE_XHDR)
|
||||
{
|
||||
if (req->decode_off + lsxpack_header_get_dec_size(&req->xhdr)
|
||||
>= sizeof(req->decode_buf))
|
||||
{
|
||||
LSQ_WARN("Not enough room in header");
|
||||
return NULL;
|
||||
}
|
||||
req->decode_off += lsxpack_header_get_dec_size(&req->xhdr);
|
||||
}
|
||||
else
|
||||
req->flags |= HAVE_XHDR;
|
||||
|
||||
lsxpack_header_prepare_decode(&req->xhdr, req->decode_buf,
|
||||
req->decode_off, sizeof(req->decode_buf));
|
||||
req->decode_off, sizeof(req->decode_buf) - req->decode_off);
|
||||
return &req->xhdr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue