only run DPLPMTUD if the connection can send packets with the DF bit set (#3879)

This commit is contained in:
Marten Seemann
2023-06-02 16:54:34 +03:00
committed by GitHub
parent 0438eada95
commit 614fdb3271
15 changed files with 67 additions and 26 deletions

View File

@@ -24,8 +24,9 @@ var _ = Describe("OOB Conn Test", func() {
Expect(err).ToNot(HaveOccurred())
udpConn, err := net.ListenUDP(network, addr)
Expect(err).ToNot(HaveOccurred())
oobConn, err := newConn(udpConn)
oobConn, err := newConn(udpConn, true)
Expect(err).ToNot(HaveOccurred())
Expect(oobConn.capabilities().DF).To(BeTrue())
packetChan := make(chan *receivedPacket)
go func() {
@@ -228,7 +229,7 @@ var _ = Describe("OOB Conn Test", func() {
Expect(err).ToNot(HaveOccurred())
udpConn, err := net.ListenUDP("udp", addr)
Expect(err).ToNot(HaveOccurred())
oobConn, err := newConn(udpConn)
oobConn, err := newConn(udpConn, true)
Expect(err).ToNot(HaveOccurred())
oobConn.batchConn = batchConn