aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/transport/chttp2_transport.c
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-06-08 08:06:27 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-06-08 08:06:27 -0700
commit723e84ef1a24479f07b88ac70e5eae41cbe77fb8 (patch)
treee95fe83f61fdcf0b0aeb387b88c70c95bc88c82f /src/core/transport/chttp2_transport.c
parent2c42ef3eb3cca8261d7ea466b8254441f8414b02 (diff)
parent3a227ee45deb09f3cb9f9085fa2776598adbcd21 (diff)
Merge branch 'we-dont-need-no-backup' of github.com:ctiller/grpc into we-dont-need-no-backup
Diffstat (limited to 'src/core/transport/chttp2_transport.c')
-rw-r--r--src/core/transport/chttp2_transport.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c
index a14eebb683..3d8f54c3c8 100644
--- a/src/core/transport/chttp2_transport.c
+++ b/src/core/transport/chttp2_transport.c
@@ -1595,12 +1595,21 @@ static int init_goaway_parser(transport *t) {
}
static int init_settings_frame_parser(transport *t) {
- int ok = GRPC_CHTTP2_PARSE_OK ==
+ int ok;
+
+ if (t->incoming_stream_id != 0) {
+ gpr_log(GPR_ERROR, "settings frame received for stream %d", t->incoming_stream_id);
+ drop_connection(t);
+ return 0;
+ }
+
+ ok = GRPC_CHTTP2_PARSE_OK ==
grpc_chttp2_settings_parser_begin_frame(
&t->simple_parsers.settings, t->incoming_frame_size,
t->incoming_frame_flags, t->settings[PEER_SETTINGS]);
if (!ok) {
drop_connection(t);
+ return 0;
}
if (t->incoming_frame_flags & GRPC_CHTTP2_FLAG_ACK) {
memcpy(t->settings[ACKED_SETTINGS], t->settings[SENT_SETTINGS],