aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/transport
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-06-06 14:43:06 -0700
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-06-06 14:43:06 -0700
commitf39f2d6ddef77b407bf17cb7be8c21cc5b37d889 (patch)
tree1238134b8a02139de6ad2efbe809c73a2fe66772 /src/core/transport
parentf50abfcbc246d9f338b800f2b1c2365520f34e3f (diff)
parentcce361f7ca984200b32738fda355fede7a2ecd58 (diff)
Merge github.com:grpc/grpc into we-dont-need-no-backup
Conflicts: test/core/bad_client/bad_client.c test/core/httpcli/httpcli_test.c
Diffstat (limited to 'src/core/transport')
-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 d9c712cc63..c4c5a392b3 100644
--- a/src/core/transport/chttp2_transport.c
+++ b/src/core/transport/chttp2_transport.c
@@ -1588,12 +1588,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],