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

@@ -15,6 +15,12 @@ import (
"github.com/quic-go/quic-go/internal/utils"
)
type connCapabilities struct {
// This connection has the Don't Fragment (DF) bit set.
// This means it makes to run DPLPMTUD.
DF bool
}
// rawConn is a connection that allow reading of a receivedPackeh.
type rawConn interface {
ReadPacket() (*receivedPacket, error)
@@ -22,6 +28,8 @@ type rawConn interface {
LocalAddr() net.Addr
SetReadDeadline(time.Time) error
io.Closer
capabilities() connCapabilities
}
type closePacket struct {