MINOR: h2: add a generic frame checker
authorWilly Tarreau <w@1wt.eu>
Wed, 30 Jan 2019 14:09:21 +0000 (15:09 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Jan 2019 18:37:20 +0000 (19:37 +0100)
commit9c84d8299a733bf9bb979cd147e9c566f9e1ae67
tree410b8975c98d022b15e4cf35996e77f5de8a811b
parent08bb1d61099e7f12aea17a03c608e51002442ed7
MINOR: h2: add a generic frame checker

The new function h2_frame_check() checks the protocol limits for the
received frame (length, ID, direction) and returns a verdict made of
a connection error code. The purpose is to be able to validate any
frame regardless of the state and the ability to call the frame handler,
and to emit a GOAWAY early in this case.
include/common/h2.h
src/h2.c