mirror of
https://github.com/netbirdio/netbird.git
synced 2025-06-19 17:31:39 +02:00
[relay] Set InitialPacketSize to the maximum allowable value (#3188)
Fixes an issue on macOS where the server throws errors with default settings: failed to write transport message to: DATAGRAM frame too large. Further investigation is required to optimize MTU-related values.
This commit is contained in:
parent
bc7b2c6ba3
commit
481bbe8513
@ -29,9 +29,10 @@ func (d Dialer) Dial(ctx context.Context, address string) (net.Conn, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
quicConfig := &quic.Config{
|
quicConfig := &quic.Config{
|
||||||
KeepAlivePeriod: 30 * time.Second,
|
KeepAlivePeriod: 30 * time.Second,
|
||||||
MaxIdleTimeout: 4 * time.Minute,
|
MaxIdleTimeout: 4 * time.Minute,
|
||||||
EnableDatagrams: true,
|
EnableDatagrams: true,
|
||||||
|
InitialPacketSize: 1452,
|
||||||
}
|
}
|
||||||
|
|
||||||
udpConn, err := nbnet.ListenUDP("udp", &net.UDPAddr{IP: net.IPv4zero, Port: 0})
|
udpConn, err := nbnet.ListenUDP("udp", &net.UDPAddr{IP: net.IPv4zero, Port: 0})
|
||||||
|
@ -25,7 +25,8 @@ func (l *Listener) Listen(acceptFn func(conn net.Conn)) error {
|
|||||||
l.acceptFn = acceptFn
|
l.acceptFn = acceptFn
|
||||||
|
|
||||||
quicCfg := &quic.Config{
|
quicCfg := &quic.Config{
|
||||||
EnableDatagrams: true,
|
EnableDatagrams: true,
|
||||||
|
InitialPacketSize: 1452,
|
||||||
}
|
}
|
||||||
listener, err := quic.ListenAddr(l.Address, l.TLSConfig, quicCfg)
|
listener, err := quic.ListenAddr(l.Address, l.TLSConfig, quicCfg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user