forked from quic-go/quic-go
qlog coalesced packets dropped due to wrong destination connection ID
This commit is contained in:
@@ -717,6 +717,9 @@ func (s *session) handlePacketImpl(rp *receivedPacket) bool {
|
||||
}
|
||||
|
||||
if counter > 0 && !hdr.DestConnectionID.Equal(lastConnID) {
|
||||
if s.qlogger != nil {
|
||||
s.qlogger.DroppedPacket(qlog.PacketTypeFromHeader(hdr), protocol.ByteCount(len(data)), qlog.PacketDropUnknownConnectionID)
|
||||
}
|
||||
s.logger.Debugf("coalesced packet has different destination connection ID: %s, expected %s", hdr.DestConnectionID, lastConnID)
|
||||
break
|
||||
}
|
||||
|
||||
@@ -906,7 +906,10 @@ var _ = Describe("Session", func() {
|
||||
})
|
||||
_, packet2 := getPacketWithLength(wrongConnID, 123)
|
||||
// don't EXPECT any more calls to unpacker.Unpack()
|
||||
qlogger.EXPECT().ReceivedPacket(gomock.Any(), protocol.ByteCount(len(packet1.data)), gomock.Any())
|
||||
gomock.InOrder(
|
||||
qlogger.EXPECT().ReceivedPacket(gomock.Any(), protocol.ByteCount(len(packet1.data)), gomock.Any()),
|
||||
qlogger.EXPECT().DroppedPacket(gomock.Any(), protocol.ByteCount(len(packet2.data)), qlog.PacketDropUnknownConnectionID),
|
||||
)
|
||||
packet1.data = append(packet1.data, packet2.data...)
|
||||
Expect(sess.handlePacketImpl(packet1)).To(BeTrue())
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user