From b78e44eec5aaa0a56c5a8fd54f1da825d6427418 Mon Sep 17 00:00:00 2001 From: Dmitri Tikhonov Date: Tue, 12 May 2020 16:50:36 -0400 Subject: [PATCH] Release 2.14.7 - [BUGFIX] ALPN-to-version mapping: do not skip h3-Q050. - [BUGFIX] Frame reader: skip headers if target stream is closed. --- CHANGELOG | 5 +++++ docs/conf.py | 2 +- include/lsquic.h | 2 +- src/liblsquic/gen-verstrs.pl | 8 ++------ src/liblsquic/lsquic_conn.h | 1 + src/liblsquic/lsquic_full_conn.c | 8 +++++++- 6 files changed, 17 insertions(+), 9 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 9ae39e4..dce5508 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +2020-05-12 + - 2.14.7 + - [BUGFIX] ALPN-to-version mapping: do not skip h3-Q050. + - [BUGFIX] Frame reader: skip headers if target stream is closed. + 2020-05-06 - 2.14.6 - [BUGFIX] Fix amplification mitigation in 0-RTT case. diff --git a/docs/conf.py b/docs/conf.py index e171bd4..b31bf3b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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.6' +release = u'2.14.7' # -- General configuration --------------------------------------------------- diff --git a/include/lsquic.h b/include/lsquic.h index 3a32ada..ee19946 100644 --- a/include/lsquic.h +++ b/include/lsquic.h @@ -25,7 +25,7 @@ extern "C" { #define LSQUIC_MAJOR_VERSION 2 #define LSQUIC_MINOR_VERSION 14 -#define LSQUIC_PATCH_VERSION 6 +#define LSQUIC_PATCH_VERSION 7 /** * Engine flags: diff --git a/src/liblsquic/gen-verstrs.pl b/src/liblsquic/gen-verstrs.pl index 3e6ca9a..b372a75 100755 --- a/src/liblsquic/gen-verstrs.pl +++ b/src/liblsquic/gen-verstrs.pl @@ -142,12 +142,8 @@ lsquic_alpn2ver (const char *alpn, size_t len) } map[] = { C_CODE -for ($i = 0; $i < @versions; ++$i) { - print OUT " {sizeof(\"h3-Q0$versions[$i]\")-1,\"h3-Q0$versions[$i]\", $enums[$i]},\n"; -} - -for ($i = 0; $i < @draft_versions; ++$i) { - print OUT " {sizeof(\"h3-$draft_versions[$i]\")-1,\"h3-$draft_versions[$i]\", LSQVER_ID$draft_versions[$i]},\n"; +for ($i = 0; $i < @all_alpns; ++$i) { + print OUT " {sizeof(\"$all_alpns[$i]\")-1,\"$all_alpns[$i]\", $all_versions[$i]},\n"; } print OUT <<'C_CODE'; diff --git a/src/liblsquic/lsquic_conn.h b/src/liblsquic/lsquic_conn.h index a72b9a2..087aae7 100644 --- a/src/liblsquic/lsquic_conn.h +++ b/src/liblsquic/lsquic_conn.h @@ -157,6 +157,7 @@ struct conn_iface (*ci_is_push_enabled) (struct lsquic_conn *); /* Optional: only used by gQUIC frames reader */ + /* If stream is already closed, NULL is returned */ struct lsquic_stream * (*ci_get_stream_by_id) (struct lsquic_conn *, lsquic_stream_id_t stream_id); diff --git a/src/liblsquic/lsquic_full_conn.c b/src/liblsquic/lsquic_full_conn.c index 2bda7a6..3d6d250 100644 --- a/src/liblsquic/lsquic_full_conn.c +++ b/src/liblsquic/lsquic_full_conn.c @@ -1412,7 +1412,13 @@ full_conn_ci_get_stream_by_id (struct lsquic_conn *lconn, lsquic_stream_id_t stream_id) { struct full_conn *conn = (struct full_conn *) lconn; - return find_stream_by_id(conn, stream_id); + struct lsquic_stream *stream; + + stream = find_stream_by_id(conn, stream_id); + if (stream && !lsquic_stream_is_closed(stream)) + return stream; + else + return NULL; }