Commit 40a57565 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Terminate connection if unknown frame type is received

parent f2c654f8
......@@ -3432,7 +3432,9 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
iframe->state = NGHTTP2_IB_READ_NBYTE;
iframe->left = 8;
break;
case NGHTTP2_CONTINUATION:
default:
/* Receiving unknown frame type and CONTINUATION in this state
are subject to connection error of type PROTOCOL_ERROR */
rv = nghttp2_session_terminate_session(session,
NGHTTP2_PROTOCOL_ERROR);
if(nghttp2_is_fatal(rv)) {
......@@ -3441,10 +3443,6 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
busy = 1;
iframe->state = NGHTTP2_IB_IGN_PAYLOAD;
break;
default:
busy = 1;
iframe->state = NGHTTP2_IB_IGN_PAYLOAD;
break;
}
break;
case NGHTTP2_IB_READ_NBYTE:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment