TUN-5623: Configure quic max datagram frame size to 1350 bytes for none Windows platforms

This commit is contained in:
cthuang
2022-01-06 12:17:10 +00:00
parent ef3152f334
commit 6fa58aadba
44 changed files with 11652 additions and 57 deletions

View File

@@ -114,7 +114,7 @@ func (s *Session) dstToTransport(buffer []byte) error {
s.log.Debug().
Str("session", s.ID.String()).
Int("len", n).
Uint("mtu", s.transport.MTU()).
Int("mtu", s.transport.MTU()).
Msg("dropped packet exceeding MTU")
}
}

View File

@@ -9,5 +9,5 @@ type transport interface {
// ReceiveFrom reads the next datagram from the transport
ReceiveFrom() (uuid.UUID, []byte, error)
// Max transmission unit to receive from the transport
MTU() uint
MTU() int
}

View File

@@ -22,8 +22,8 @@ func (mt *mockQUICTransport) ReceiveFrom() (uuid.UUID, []byte, error) {
return mt.reqChan.Receive(context.Background())
}
func (mt *mockQUICTransport) MTU() uint {
return 1217
func (mt *mockQUICTransport) MTU() int {
return 1280
}
func (mt *mockQUICTransport) newRequest(ctx context.Context, sessionID uuid.UUID, payload []byte) error {