disable connection migration

Connection migration is complicated: We need to verify the new path, and
reset the congestion controller. In the IETF draft, connection migration
is still work in progress.
This commit is contained in:
Marten Seemann 2017-11-30 16:43:12 +07:00
parent 5d900346fd
commit ad22ed9d16
2 changed files with 4 additions and 25 deletions

View file

@ -739,16 +739,17 @@ var _ = Describe("Session", func() {
})
Context("updating the remote address", func() {
It("sets the remote address", func() {
It("doesn't support connection migration", func() {
origAddr := sess.conn.(*mockConnection).remoteAddr
remoteIP := &net.IPAddr{IP: net.IPv4(192, 168, 0, 100)}
Expect(sess.conn.(*mockConnection).remoteAddr).ToNot(Equal(remoteIP))
Expect(origAddr).ToNot(Equal(remoteIP))
p := receivedPacket{
remoteAddr: remoteIP,
header: &wire.Header{PacketNumber: 1337},
}
err := sess.handlePacketImpl(&p)
Expect(err).ToNot(HaveOccurred())
Expect(sess.conn.(*mockConnection).remoteAddr).To(Equal(remoteIP))
Expect(sess.conn.(*mockConnection).remoteAddr).To(Equal(origAddr))
})
It("doesn't change the remote address if authenticating the packet fails", func() {
@ -767,20 +768,6 @@ var _ = Describe("Session", func() {
Expect(quicErr.ErrorCode).To(Equal(qerr.DecryptionFailure))
Expect(sess.conn.(*mockConnection).remoteAddr).To(Equal(remoteIP))
})
It("sets the remote address, if the packet is authenticated, but unpacking fails for another reason", func() {
testErr := errors.New("testErr")
remoteIP := &net.IPAddr{IP: net.IPv4(192, 168, 0, 100)}
Expect(sess.conn.(*mockConnection).remoteAddr).ToNot(Equal(remoteIP))
p := receivedPacket{
remoteAddr: remoteIP,
header: &wire.Header{PacketNumber: 1337},
}
sess.unpacker.(*mockUnpacker).unpackErr = testErr
err := sess.handlePacketImpl(&p)
Expect(err).To(MatchError(testErr))
Expect(sess.conn.(*mockConnection).remoteAddr).To(Equal(remoteIP))
})
})
})