Terminate connection if unknown frame type is received
This commit is contained in:
parent
f2c654f898
commit
40a5756564
|
@ -3432,7 +3432,9 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
|
||||||
iframe->state = NGHTTP2_IB_READ_NBYTE;
|
iframe->state = NGHTTP2_IB_READ_NBYTE;
|
||||||
iframe->left = 8;
|
iframe->left = 8;
|
||||||
break;
|
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,
|
rv = nghttp2_session_terminate_session(session,
|
||||||
NGHTTP2_PROTOCOL_ERROR);
|
NGHTTP2_PROTOCOL_ERROR);
|
||||||
if(nghttp2_is_fatal(rv)) {
|
if(nghttp2_is_fatal(rv)) {
|
||||||
|
@ -3441,10 +3443,6 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
|
||||||
busy = 1;
|
busy = 1;
|
||||||
iframe->state = NGHTTP2_IB_IGN_PAYLOAD;
|
iframe->state = NGHTTP2_IB_IGN_PAYLOAD;
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
busy = 1;
|
|
||||||
iframe->state = NGHTTP2_IB_IGN_PAYLOAD;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NGHTTP2_IB_READ_NBYTE:
|
case NGHTTP2_IB_READ_NBYTE:
|
||||||
|
|
Loading…
Reference in New Issue