reject DATAGRAM frames if datagram support is not enabled

This commit is contained in:
Marten Seemann 2019-10-06 17:50:27 +02:00
parent 913ddc5081
commit fd41e8fa62
7 changed files with 38 additions and 11 deletions

View file

@ -521,7 +521,7 @@ var _ = Describe("Server", func() {
Expect(err).ToNot(HaveOccurred())
data, err := opener.Open(nil, b[extHdr.ParsedLen():], extHdr.PacketNumber, b[:extHdr.ParsedLen()])
Expect(err).ToNot(HaveOccurred())
f, err := wire.NewFrameParser(hdr.Version).ParseNext(bytes.NewReader(data), protocol.EncryptionInitial)
f, err := wire.NewFrameParser(false, hdr.Version).ParseNext(bytes.NewReader(data), protocol.EncryptionInitial)
Expect(err).ToNot(HaveOccurred())
Expect(f).To(BeAssignableToTypeOf(&wire.ConnectionCloseFrame{}))
ccf := f.(*wire.ConnectionCloseFrame)