forked from quic-go/quic-go
implement parsing and writing of RESET_STREAM_AT frames (#5155)
* implement parsing and writing of RESET_STREAM_AT frames * wire: add support for parsing RESET_STREAM_AT frames
This commit is contained in:
@@ -34,7 +34,7 @@ func Fuzz(data []byte) int {
|
||||
encLevel := toEncLevel(data[0])
|
||||
data = data[PrefixLen:]
|
||||
|
||||
parser := wire.NewFrameParser(true)
|
||||
parser := wire.NewFrameParser(true, true)
|
||||
parser.SetAckDelayExponent(protocol.DefaultAckDelayExponent)
|
||||
|
||||
var numFrames int
|
||||
@@ -131,5 +131,9 @@ func validateFrame(frame wire.Frame) {
|
||||
if f.IsApplicationError && f.FrameType != 0 {
|
||||
panic("CONNECTION_CLOSE for an application error containing a frame type")
|
||||
}
|
||||
case *wire.ResetStreamFrame:
|
||||
if f.FinalSize < f.ReliableSize {
|
||||
panic("RESET_STREAM frame with a FinalSize smaller than the ReliableSize")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user