[master] 1468655 Missed these in previous commit.
Poul-Henning Kamp
phk at FreeBSD.org
Mon Mar 6 16:07:06 CET 2017
commit 1468655f61335e333f377b21bc37444c48944eb5
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Mar 6 15:02:34 2017 +0000
Missed these in previous commit.
diff --git a/bin/varnishtest/tests/t02003.vtc b/bin/varnishtest/tests/t02003.vtc
index 0686628..62b0fe7 100644
--- a/bin/varnishtest/tests/t02003.vtc
+++ b/bin/varnishtest/tests/t02003.vtc
@@ -165,3 +165,45 @@ client c1 {
expect goaway.laststream == 0
} -run
} -run
+
+#######################################################################
+# Test SETTING error conditions
+
+client c1 {
+ stream 0 {
+ # SETTING ACK with data
+ sendhex "000001 04 01 00000000 aa"
+ rxgoaway
+ expect goaway.err == FRAME_SIZE_ERROR
+ expect goaway.laststream == 0
+ } -run
+} -run
+
+client c1 {
+ stream 0 {
+ # SETTING ACK with bad length
+ sendhex "000001 04 00 00000000 aa"
+ rxgoaway
+ expect goaway.err == PROTOCOL_ERROR
+ expect goaway.laststream == 0
+ } -run
+} -run
+
+client c1 {
+ stream 0 {
+ # SETTING ACK with bad value
+ txsettings -winsize 0x80000000
+ rxgoaway
+ expect goaway.err == FLOW_CONTROL_ERROR
+ expect goaway.laststream == 0
+ } -run
+} -run
+
+client c1 {
+ stream 0 {
+ # SETTING unknown vlaue
+ sendhex "000006 04 00 00000000 ffff00000000"
+ txping
+ rxping
+ } -run
+} -run
diff --git a/bin/varnishtest/vtc_http2.c b/bin/varnishtest/vtc_http2.c
index f1f03f6..420a4db 100644
--- a/bin/varnishtest/vtc_http2.c
+++ b/bin/varnishtest/vtc_http2.c
@@ -71,7 +71,7 @@ static const char *const h2_types[] = {
static const char * const h2_settings[] = {
[0] = "unknown",
-#define H2_SETTINGS(U,v,d) [v] = #U,
+#define H2_SETTING(U,l,v,...) [v] = #U,
#include <tbl/h2_settings.h>
NULL
};
diff --git a/include/tbl/h2_settings.h b/include/tbl/h2_settings.h
index 929094c..765ee18 100644
--- a/include/tbl/h2_settings.h
+++ b/include/tbl/h2_settings.h
@@ -26,16 +26,72 @@
* SUCH DAMAGE.
*
* RFC7540 section 11.3
+ *
+ * Upper
+ * lower
+ * tag
+ * default
+ * min
+ * max
+ * range_error
*/
/*lint -save -e525 -e539 */
-H2_SETTINGS(HEADER_TABLE_SIZE, 0x1, 4096)
-H2_SETTINGS(ENABLE_PUSH, 0x2, 1)
-H2_SETTINGS(MAX_CONCURRENT_STREAMS, 0x3, 0xffffffff)
-H2_SETTINGS(INITIAL_WINDOW_SIZE, 0x4, 65535)
-H2_SETTINGS(MAX_FRAME_SIZE, 0x5, 16384)
-H2_SETTINGS(MAX_HEADER_LIST_SIZE, 0x6, 0xffffffff)
-#undef H2_SETTINGS
+H2_SETTING( // rfc7540,l,2097,2103
+ HEADER_TABLE_SIZE,
+ header_table_size,
+ 0x1,
+ 4096,
+ 0,
+ 0xffffffff,
+ 0
+)
+H2_SETTING( // rfc7540,l,2105,2114
+ ENABLE_PUSH,
+ enable_push,
+ 0x2,
+ 1,
+ 0,
+ 1,
+ H2CE_PROTOCOL_ERROR
+)
+H2_SETTING( // rfc7540,l,2116,2121
+ MAX_CONCURRENT_STREAMS,
+ max_concurrent_streams,
+ 0x3,
+ 0xffffffff,
+ 0,
+ 0xffffffff,
+ 0
+)
+H2_SETTING( // rfc7540,l,2139,2148
+ INITIAL_WINDOW_SIZE,
+ initial_window_size,
+ 0x4,
+ 65535,
+ 0,
+ 0x7fffffff,
+ H2CE_FLOW_CONTROL_ERROR
+)
+H2_SETTING( // rfc7540,l,2150,2157
+ MAX_FRAME_SIZE,
+ max_frame_size,
+ 0x5,
+ 16384,
+ 16384,
+ 0x00ffffff,
+ H2CE_PROTOCOL_ERROR
+)
+H2_SETTING( // rfc7540,l,2159,2167
+ MAX_HEADER_LIST_SIZE,
+ max_header_list_size,
+ 0x6,
+ 0xffffffff,
+ 0,
+ 0xffffffff,
+ 0
+)
+#undef H2_SETTING
/*lint -restore */
More information about the varnish-commit
mailing list