Skip to content

Commit

Permalink
Release 2.24.1
Browse files Browse the repository at this point in the history
- [API] Allow use of ea_get_ssl_ctx() on the client (optional).  PR #186.
- [BUGFIX] Expand datagram with ack-eliciting Initial to 1200 bytes
  after connection promotion.
- [BUGFIX] Discard CRYPTO frames from lower encryption levels after
  connection promotion.
- [BUGFIX] Cancel path response if path could not be initialized.
  • Loading branch information
Dmitri Tikhonov committed Nov 4, 2020
1 parent b0dd78b commit e85d285
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 8 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2020-11-04
- 2.24.1
- [API] Allow use of ea_get_ssl_ctx() on the client (optional). PR #186.
- [BUGFIX] Expand datagram with ack-eliciting Initial to 1200 bytes
after connection promotion.
- [BUGFIX] Discard CRYPTO frames from lower encryption levels after
connection promotion.
- [BUGFIX] Cancel path response if path could not be initialized.

2020-10-28
- 2.24.0
- [FEATURE] QUIC and HTTP/3 Internet Draft 31 support. Drop ID-30
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ to the LiteSpeed QUIC and HTTP/3 Library:
- Rahul Jadhav -- Android support
- Victor Stewart -- Generate SCIDs API (connection ID steering)
- Aaron France -- Shared library support and Lisp bindings
- Suma Subbarao -- Use callback to supply client's SSL_CTX

Thank you!

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# The short X.Y version
version = u'2.24'
# The full version, including alpha/beta/rc tags
release = u'2.24.0'
release = u'2.24.1'


# -- General configuration ---------------------------------------------------
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 24
#define LSQUIC_PATCH_VERSION 0
#define LSQUIC_PATCH_VERSION 1

/**
* Engine flags:
Expand Down
30 changes: 25 additions & 5 deletions src/liblsquic/lsquic_full_conn_ietf.c
Original file line number Diff line number Diff line change
Expand Up @@ -5357,16 +5357,27 @@ process_crypto_frame_server (struct ietf_full_conn *conn,
struct lsquic_packet_in *packet_in, const unsigned char *p, size_t len)
{
struct stream_frame stream_frame;
enum enc_level enc_level;
int parsed_len;

parsed_len = conn->ifc_conn.cn_pf->pf_parse_crypto_frame(p, len,
&stream_frame);
if (parsed_len < 0)
return 0;

enc_level = lsquic_packet_in_enc_level(packet_in);
EV_LOG_CRYPTO_FRAME_IN(LSQUIC_LOG_CONN_ID, &stream_frame, enc_level);
LSQ_DEBUG("Got CRYPTO frame for enc level #%u", enc_level);
if (!(conn->ifc_flags & IFC_PROC_CRYPTO))
{
LSQ_DEBUG("discard %d-byte CRYPTO frame", parsed_len);
LSQ_DEBUG("discard %d-byte CRYPTO frame: handshake has been confirmed",
parsed_len);
return (unsigned) parsed_len;
}
if (enc_level < ENC_LEV_INIT)
{ /* Must be dup */
LSQ_DEBUG("discard %d-byte CRYPTO frame on level %s", parsed_len,
lsquic_enclev2str[enc_level]);
return (unsigned) parsed_len;
}

Expand Down Expand Up @@ -6581,7 +6592,7 @@ init_new_path (struct ietf_full_conn *conn, struct conn_path *path,
}


static void
static int
on_new_or_unconfirmed_path (struct ietf_full_conn *conn,
const struct lsquic_packet_in *packet_in)
{
Expand All @@ -6608,7 +6619,7 @@ on_new_or_unconfirmed_path (struct ietf_full_conn *conn,
{
ABORT_ERROR("DCID %"CID_FMT" not found on new path",
CID_BITS(&packet_in->pi_dcid));
return;
return -1;
}

dcid_changed = !(cce->cce_flags & CCE_USED);
Expand All @@ -6620,7 +6631,7 @@ on_new_or_unconfirmed_path (struct ietf_full_conn *conn,
if (0 == init_new_path(conn, path, dcid_changed))
path->cop_flags |= COP_INITIALIZED;
else
return;
return -1;

conn->ifc_send_flags |= SF_SEND_PATH_CHAL << packet_in->pi_path_id;
LSQ_DEBUG("scheduled return path challenge on path %hhu",
Expand All @@ -6638,6 +6649,7 @@ on_new_or_unconfirmed_path (struct ietf_full_conn *conn,
path->cop_cce_idx = cce - lconn->cn_cces;
cce->cce_flags |= CCE_USED;
LOG_SCIDS(conn);
return 0;
}


Expand Down Expand Up @@ -7157,7 +7169,15 @@ process_regular_packet (struct ietf_full_conn *conn,
if (saved_path_id == conn->ifc_cur_path_id)
{
if (conn->ifc_cur_path_id != packet_in->pi_path_id)
on_new_or_unconfirmed_path(conn, packet_in);
{
if (0 != on_new_or_unconfirmed_path(conn, packet_in))
{
LSQ_DEBUG("path %hhu invalid, cancel any path response "
"on it", packet_in->pi_path_id);
conn->ifc_send_flags &= ~(SF_SEND_PATH_RESP
<< packet_in->pi_path_id);
}
}
else if (!LSQUIC_CIDS_EQ(CN_SCID(&conn->ifc_conn),
&packet_in->pi_dcid))
{
Expand Down
4 changes: 3 additions & 1 deletion src/liblsquic/lsquic_send_ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1943,7 +1943,9 @@ lsquic_send_ctl_next_packet_to_send (struct lsquic_send_ctl *ctl,
packet_out->po_lflags &= ~POL_LIMITED;

if (UNLIKELY(packet_out->po_header_type == HETY_INITIAL)
&& !(ctl->sc_conn_pub->lconn->cn_flags & LSCONN_SERVER)
&& (!(ctl->sc_conn_pub->lconn->cn_flags & LSCONN_SERVER)
|| (packet_out->po_frame_types
& IQUIC_FRAME_ACKABLE_MASK))
&& size < 1200)
{
send_ctl_maybe_zero_pad(ctl, packet_out, 1200 - size);
Expand Down

0 comments on commit e85d285

Please sign in to comment.