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 +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));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue