remove the RequireAddressValidation callback from the Config (#4253)

This commit is contained in:
Marten Seemann 2024-01-22 21:24:07 -08:00 committed by GitHub
parent 892851eb8c
commit a2cf43d75c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 127 additions and 128 deletions

View file

@ -464,14 +464,19 @@ var _ = Describe("0-RTT", func() {
}
counter, tracer := newPacketTracer()
ln, err := quic.ListenAddrEarly(
"localhost:0",
laddr, err := net.ResolveUDPAddr("udp", "localhost:0")
Expect(err).ToNot(HaveOccurred())
udpConn, err := net.ListenUDP("udp", laddr)
Expect(err).ToNot(HaveOccurred())
defer udpConn.Close()
tr := &quic.Transport{
Conn: udpConn,
MaxUnvalidatedHandshakes: -1,
}
defer tr.Close()
ln, err := tr.ListenEarly(
tlsConf,
getQuicConfig(&quic.Config{
RequireAddressValidation: func(net.Addr) bool { return true },
Allow0RTT: true,
Tracer: newTracer(tracer),
}),
getQuicConfig(&quic.Config{Allow0RTT: true, Tracer: newTracer(tracer)}),
)
Expect(err).ToNot(HaveOccurred())
defer ln.Close()