Release 2.27.6

- [BUGFIX] Replace dispatch read/write events assertion with a check.
- [BUGFIX] gQUIC connection close: there is no HEADERS stream without
  HTTP flag, see issue #220.
- http_client, http_server: add hq protocol support and other flags
  for use with QUIC Interop Runner.
- Fix: use IP_PMTUDISC_PROBE (not IP_PMTUDISC_DO) on Linux to set
  Don't-Fragment flag on outgoing packets.
- Fix send_packets_one_by_one on Windows platform when sending
  multiple iovs, see issue #218.
- Exit echo_client on Windows immediately, see issue #219.
This commit is contained in:
Dmitri Tikhonov 2021-01-27 10:36:25 -05:00
parent 65c5d50287
commit 5650ee6cd6
11 changed files with 274 additions and 14 deletions

View file

@ -2615,10 +2615,12 @@ maybe_close_conn (struct full_conn *conn)
struct lsquic_stream *stream;
struct lsquic_hash_elem *el;
#endif
const unsigned n_special_streams = N_SPECIAL_STREAMS
- !(conn->fc_flags & FC_HTTP);
if ((conn->fc_flags & (FC_CLOSING|FC_GOAWAY_SENT|FC_SERVER))
== (FC_GOAWAY_SENT|FC_SERVER)
&& lsquic_hash_count(conn->fc_pub.all_streams) == N_SPECIAL_STREAMS)
&& lsquic_hash_count(conn->fc_pub.all_streams) == n_special_streams)
{
#ifndef NDEBUG
for (el = lsquic_hash_first(conn->fc_pub.all_streams); el;

View file

@ -1699,6 +1699,22 @@ static const enum header_type bits2ht[4] =
};
#if LSQUIC_QIR
/* Return true if the parsing function is to enforce the minimum DCID
* length requirement as specified in IETF v1 and the I-Ds.
*/
static int
enforce_initial_dcil (lsquic_ver_tag_t tag)
{
enum lsquic_version version;
version = lsquic_tag2ver(tag);
return version != (enum lsquic_version) -1
&& ((1 << version) & LSQUIC_IETF_VERSIONS);
}
#endif
int
lsquic_ietf_v1_parse_packet_in_long_begin (struct lsquic_packet_in *packet_in,
size_t length, int is_server, unsigned cid_len,
@ -1751,6 +1767,14 @@ lsquic_ietf_v1_parse_packet_in_long_begin (struct lsquic_packet_in *packet_in,
switch (header_type)
{
case HETY_INITIAL:
#if LSQUIC_QIR
if (!enforce_initial_dcil(tag))
{
/* Count even zero-length DCID as having DCID */
packet_in->pi_flags |= PI_CONN_ID;
}
else
#endif
if (is_server && dcil < MIN_INITIAL_DCID_LEN)
return -1;
r = vint_read(p, end, &token_len);

View file

@ -2363,12 +2363,13 @@ maybe_mark_as_blocked (lsquic_stream_t *stream)
void
lsquic_stream_dispatch_read_events (lsquic_stream_t *stream)
{
assert(stream->sm_qflags & SMQF_WANT_READ);
if (stream->sm_bflags & SMBF_RW_ONCE)
stream_dispatch_read_events_once(stream);
else
stream_dispatch_read_events_loop(stream);
if (stream->sm_qflags & SMQF_WANT_READ)
{
if (stream->sm_bflags & SMBF_RW_ONCE)
stream_dispatch_read_events_once(stream);
else
stream_dispatch_read_events_loop(stream);
}
}
@ -2381,7 +2382,9 @@ lsquic_stream_dispatch_write_events (lsquic_stream_t *stream)
unsigned short n_buffered;
enum stream_q_flags q_flags;
assert(stream->sm_qflags & SMQF_WRITE_Q_FLAGS);
if (!(stream->sm_qflags & SMQF_WRITE_Q_FLAGS))
return;
q_flags = stream->sm_qflags & SMQF_WRITE_Q_FLAGS;
tosend_off = stream->tosend_off;
n_buffered = stream->sm_n_buffered;