Release 2.24.2
- [BUGFIX] Allow peer to migrate when its SCID is zero-length. - [BUGFIX] PADDING size calculation: only one Short packet can be coalesced. (This should have been part of the fix in 2.24.1). - Abort connect if received NEW_CONNECTION_ID but current DCID is zero-length. - Improve log messages
This commit is contained in:
parent
e85d2854d3
commit
ee4d393028
|
@ -1,3 +1,12 @@
|
|||
2020-11-05
|
||||
- 2.24.2
|
||||
- [BUGFIX] Allow peer to migrate when its SCID is zero-length.
|
||||
- [BUGFIX] PADDING size calculation: only one Short packet can be
|
||||
coalesced. (This should have been part of the fix in 2.24.1).
|
||||
- Abort connect if received NEW_CONNECTION_ID but current DCID is
|
||||
zero-length.
|
||||
- Improve log messages
|
||||
|
||||
2020-11-04
|
||||
- 2.24.1
|
||||
- [API] Allow use of ea_get_ssl_ctx() on the client (optional). PR #186.
|
||||
|
|
|
@ -26,7 +26,7 @@ author = u'LiteSpeed Technologies'
|
|||
# The short X.Y version
|
||||
version = u'2.24'
|
||||
# The full version, including alpha/beta/rc tags
|
||||
release = u'2.24.1'
|
||||
release = u'2.24.2'
|
||||
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
|
|
@ -25,7 +25,7 @@ extern "C" {
|
|||
|
||||
#define LSQUIC_MAJOR_VERSION 2
|
||||
#define LSQUIC_MINOR_VERSION 24
|
||||
#define LSQUIC_PATCH_VERSION 1
|
||||
#define LSQUIC_PATCH_VERSION 2
|
||||
|
||||
/**
|
||||
* Engine flags:
|
||||
|
|
|
@ -3026,7 +3026,12 @@ lsquic_engine_packet_in (lsquic_engine_t *engine,
|
|||
is_ietf = 0 == (packet_in->pi_flags & PI_GQUIC);
|
||||
packet_in_data += packet_in->pi_data_sz;
|
||||
if (is_ietf && packet_in_data < packet_end)
|
||||
{
|
||||
cid = packet_in->pi_dcid;
|
||||
if (packet_begin == packet_in->pi_data) /* Only log once: */
|
||||
LSQ_DEBUGC("received coalesced datagram of %zd bytes for "
|
||||
"connection %"CID_FMT, packet_in_size, CID_BITS(&cid));
|
||||
}
|
||||
packet_in->pi_received = lsquic_time_now();
|
||||
packet_in->pi_flags |= (3 & ecn) << PIBIT_ECN_SHIFT;
|
||||
eng_hist_inc(&engine->history, packet_in->pi_received, sl_packets_in);
|
||||
|
|
|
@ -2101,7 +2101,7 @@ maybe_get_rate_available_scid_slot (struct ietf_full_conn *conn,
|
|||
return;
|
||||
}
|
||||
|
||||
/* period: ns per cid */
|
||||
/* period: usec per cid */
|
||||
period = (60 * 1000000) / conn->ifc_enpub->enp_settings.es_scid_iss_rate;
|
||||
active_cid = 0;
|
||||
total_elapsed = 0;
|
||||
|
@ -2119,12 +2119,12 @@ maybe_get_rate_available_scid_slot (struct ietf_full_conn *conn,
|
|||
}
|
||||
}
|
||||
elapsed_thresh = ((active_cid * (active_cid + 1)) / 2) * period;
|
||||
/* compare total elapsed ns to elapsed ns threshold */
|
||||
/* compare total elapsed usec to elapsed usec threshold */
|
||||
if (total_elapsed < elapsed_thresh)
|
||||
{
|
||||
wait_time = (elapsed_thresh - total_elapsed) / active_cid;
|
||||
LSQ_DEBUG("cid_throt no SCID slots available (rate-limited), "
|
||||
"must wait %"PRIu64" ns", wait_time);
|
||||
"must wait %"PRIu64" usec", wait_time);
|
||||
lsquic_alarmset_set(&conn->ifc_alset, AL_CID_THROT, now + wait_time);
|
||||
conn->ifc_send_flags &= ~SF_SEND_NEW_CID;
|
||||
}
|
||||
|
@ -6067,6 +6067,13 @@ process_new_connection_id_frame (struct ietf_full_conn *conn,
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (CUR_DCID(conn)->len == 0)
|
||||
{
|
||||
ABORT_QUIETLY(0, TEC_PROTOCOL_VIOLATION, "Received NEW_CONNECTION_ID "
|
||||
"frame, but current DCID is zero-length");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (seqno < conn->ifc_last_retire_prior_to)
|
||||
{
|
||||
retire_seqno(conn, seqno);
|
||||
|
@ -6563,10 +6570,11 @@ init_new_path (struct ietf_full_conn *conn, struct conn_path *path,
|
|||
path->cop_path.np_dcid = dce->de_cid;
|
||||
dce->de_flags |= DE_ASSIGNED;
|
||||
}
|
||||
else if (!dcid_changed)
|
||||
else if (!dcid_changed || CUR_DCID(conn)->len == 0)
|
||||
{
|
||||
/* It is OK to reuse DCID if the peer did not use a new DCID when its
|
||||
* address changed. See [draft-ietf-quic-transport-24] Section 9.5.
|
||||
/* It is OK to reuse DCID if it is zero-length or ir the peer did not
|
||||
* use a new DCID when its address changed. See
|
||||
* [draft-ietf-quic-transport-24] Section 9.5.
|
||||
*/
|
||||
path->cop_path.np_dcid = CUR_NPATH(conn)->np_dcid;
|
||||
LSQ_DEBUGC("assigned already-used DCID %"CID_FMT" to new path %u, "
|
||||
|
|
|
@ -1811,6 +1811,8 @@ send_ctl_maybe_zero_pad (struct lsquic_send_ctl *ctl,
|
|||
if (cum_size + size > limit)
|
||||
break;
|
||||
cum_size += size;
|
||||
if (HETY_NOT_SET == packet_out->po_header_type)
|
||||
break;
|
||||
}
|
||||
|
||||
LSQ_DEBUG("cum_size: %zu; limit: %zu", cum_size, limit);
|
||||
|
|
|
@ -1069,7 +1069,7 @@ lsquic_stream_frame_in (lsquic_stream_t *stream, stream_frame_t *frame)
|
|||
assert(frame->packet_in);
|
||||
|
||||
SM_HISTORY_APPEND(stream, SHE_FRAME_IN);
|
||||
LSQ_DEBUG("received stream frame, offset 0x%"PRIX64", len %u; "
|
||||
LSQ_DEBUG("received stream frame, offset %"PRIu64", len %u; "
|
||||
"fin: %d", frame->data_frame.df_offset, frame->data_frame.df_size, !!frame->data_frame.df_fin);
|
||||
|
||||
if ((stream->sm_bflags & SMBF_USE_HEADERS)
|
||||
|
@ -1210,16 +1210,16 @@ lsquic_stream_rst_in (lsquic_stream_t *stream, uint64_t offset,
|
|||
|
||||
if (lsquic_sfcw_get_max_recv_off(&stream->fc) > offset)
|
||||
{
|
||||
LSQ_INFO("RST_STREAM invalid: its offset 0x%"PRIX64" is "
|
||||
LSQ_INFO("RST_STREAM invalid: its offset %"PRIu64" is "
|
||||
"smaller than that of byte following the last byte we have seen: "
|
||||
"0x%"PRIX64, offset,
|
||||
"%"PRIu64, offset,
|
||||
lsquic_sfcw_get_max_recv_off(&stream->fc));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!lsquic_sfcw_set_max_recv_off(&stream->fc, offset))
|
||||
{
|
||||
LSQ_INFO("RST_STREAM invalid: its offset 0x%"PRIX64
|
||||
LSQ_INFO("RST_STREAM invalid: its offset %"PRIu64
|
||||
" violates flow control", offset);
|
||||
return -1;
|
||||
}
|
||||
|
@ -4142,13 +4142,13 @@ lsquic_stream_window_update (lsquic_stream_t *stream, uint64_t offset)
|
|||
if (offset > stream->max_send_off)
|
||||
{
|
||||
SM_HISTORY_APPEND(stream, SHE_WINDOW_UPDATE);
|
||||
LSQ_DEBUG("update max send offset from 0x%"PRIX64" to "
|
||||
"0x%"PRIX64, stream->max_send_off, offset);
|
||||
LSQ_DEBUG("update max send offset from %"PRIu64" to "
|
||||
"%"PRIu64, stream->max_send_off, offset);
|
||||
stream->max_send_off = offset;
|
||||
}
|
||||
else
|
||||
LSQ_DEBUG("new offset 0x%"PRIX64" is not larger than old "
|
||||
"max send offset 0x%"PRIX64", ignoring", offset,
|
||||
LSQ_DEBUG("new offset %"PRIu64" is not larger than old "
|
||||
"max send offset %"PRIu64", ignoring", offset,
|
||||
stream->max_send_off);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue