mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-06 21:57:36 +03:00
Merge pull request #2292 from lucas-clemente/fix-0rtt-drop-test
fix session unit test checking that the client drops 0-RTT packets
This commit is contained in:
commit
2c67c117f6
1 changed files with 15 additions and 12 deletions
|
@ -719,18 +719,6 @@ var _ = Describe("Session", func() {
|
|||
Eventually(done).Should(BeClosed())
|
||||
})
|
||||
|
||||
It("ignores 0-RTT packets", func() {
|
||||
hdr := &wire.ExtendedHeader{
|
||||
Header: wire.Header{
|
||||
IsLongHeader: true,
|
||||
Type: protocol.PacketType0RTT,
|
||||
DestConnectionID: srcConnID,
|
||||
},
|
||||
PacketNumberLen: protocol.PacketNumberLen2,
|
||||
}
|
||||
Expect(sess.handlePacketImpl(getPacket(hdr, nil))).To(BeFalse())
|
||||
})
|
||||
|
||||
It("ignores packets with a different source connection ID", func() {
|
||||
hdr1 := &wire.ExtendedHeader{
|
||||
Header: wire.Header{
|
||||
|
@ -1944,6 +1932,21 @@ var _ = Describe("Client Session", func() {
|
|||
Expect(sess.handlePacketImpl(getPacket(hdr2, nil))).To(BeFalse())
|
||||
})
|
||||
|
||||
It("ignores 0-RTT packets", func() {
|
||||
hdr := &wire.ExtendedHeader{
|
||||
Header: wire.Header{
|
||||
IsLongHeader: true,
|
||||
Type: protocol.PacketType0RTT,
|
||||
DestConnectionID: srcConnID,
|
||||
Length: 2 + 6,
|
||||
Version: sess.version,
|
||||
},
|
||||
PacketNumber: 0x42,
|
||||
PacketNumberLen: protocol.PacketNumberLen2,
|
||||
}
|
||||
Expect(sess.handlePacketImpl(getPacket(hdr, []byte("foobar")))).To(BeFalse())
|
||||
})
|
||||
|
||||
// Illustrates that an injected Initial with an ACK frame for an unsent packet causes
|
||||
// the connection to immediately break down
|
||||
It("fails on Initial-level ACK for unsent packet", func() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue