mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 12:47:36 +03:00
remove unneeded check for destination connection ID in the client
The packetHandlerMap routes packets to the client based on the destination connection ID, so we can be sure that packets that are handled in the client have the right connection ID.
This commit is contained in:
parent
5e01c49fdf
commit
38548c137c
2 changed files with 0 additions and 20 deletions
|
@ -5,7 +5,6 @@ import (
|
|||
"context"
|
||||
"crypto/tls"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
"os"
|
||||
"time"
|
||||
|
@ -735,18 +734,4 @@ var _ = Describe("Client", func() {
|
|||
Expect(cl.version).ToNot(BeZero())
|
||||
Expect(cl.GetVersion()).To(Equal(cl.version))
|
||||
})
|
||||
|
||||
It("ignores packets with the wrong destination connection ID", func() {
|
||||
cl.session = NewMockQuicSession(mockCtrl) // don't EXPECT any handlePacket calls
|
||||
connID2 := protocol.ConnectionID{8, 7, 6, 5, 4, 3, 2, 1}
|
||||
Expect(connID).ToNot(Equal(connID2))
|
||||
Expect(cl.handlePacketImpl(&receivedPacket{
|
||||
remoteAddr: addr,
|
||||
hdr: &wire.Header{
|
||||
DestConnectionID: connID2,
|
||||
SrcConnectionID: connID,
|
||||
Version: cl.version,
|
||||
},
|
||||
})).To(MatchError(fmt.Sprintf("received a packet with an unexpected connection ID (0x0807060504030201, expected %s)", connID)))
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue