allow PING frames at every encryption level

This commit is contained in:
Marten Seemann
2019-10-15 10:17:02 -07:00
parent 2ef8429ce1
commit d91da7401b
2 changed files with 5 additions and 5 deletions

View File

@@ -321,11 +321,11 @@ var _ = Describe("Frame parsing", func() {
}
})
It("rejects all frames but ACK, CRYPTO and CONNECTION_CLOSE in Initial packets", func() {
It("rejects all frames but ACK, CRYPTO, PING and CONNECTION_CLOSE in Initial packets", func() {
for i, b := range framesSerialized {
_, err := parser.ParseNext(bytes.NewReader(b), protocol.EncryptionInitial)
switch frames[i].(type) {
case *AckFrame, *ConnectionCloseFrame, *CryptoFrame:
case *AckFrame, *ConnectionCloseFrame, *CryptoFrame, *PingFrame:
Expect(err).ToNot(HaveOccurred())
default:
Expect(err).To(HaveOccurred())
@@ -334,11 +334,11 @@ var _ = Describe("Frame parsing", func() {
}
})
It("rejects all frames but ACK, CRYPTO and CONNECTION_CLOSE in Handshake packets", func() {
It("rejects all frames but ACK, CRYPTO, PING and CONNECTION_CLOSE in Handshake packets", func() {
for i, b := range framesSerialized {
_, err := parser.ParseNext(bytes.NewReader(b), protocol.EncryptionHandshake)
switch frames[i].(type) {
case *AckFrame, *ConnectionCloseFrame, *CryptoFrame:
case *AckFrame, *ConnectionCloseFrame, *CryptoFrame, *PingFrame:
Expect(err).ToNot(HaveOccurred())
default:
Expect(err).To(HaveOccurred())