always allow sending of IETF QUIC Version Negotiation Packets

When receiving a packet with an IETF QUIC Header using an unsupported
version, we should send a IETF QUIC Version Negotiation Packet, even if
none of the supported versions is IETF QUIC.
This commit is contained in:
Marten Seemann 2018-08-15 15:23:28 +07:00
parent 58eae32bc9
commit acb45c0ef1
4 changed files with 42 additions and 58 deletions

View file

@ -379,6 +379,7 @@ var _ = Describe("Server", func() {
DestConnectionID: connID,
PacketNumber: 1,
PacketNumberLen: protocol.PacketNumberLen2,
Version: protocol.Version39 - 1,
}
Expect(hdr.Write(b, protocol.PerspectiveClient, 13 /* not a valid QUIC version */)).To(Succeed())
b.Write(bytes.Repeat([]byte{0}, protocol.MinClientHelloSize)) // add a fake CHLO
@ -411,7 +412,6 @@ var _ = Describe("Server", func() {
})
It("sends an IETF draft style Version Negotaion Packet, if the client sent a IETF draft style header", func() {
config.Versions = append(config.Versions, protocol.VersionTLS)
ln, err := Listen(conn, testdata.GetTLSConfig(), config)
Expect(err).ToNot(HaveOccurred())