mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-30 13:35:37 +00:00
a47ce618bd
Certain device drivers (e.g. vxlan, geneve) do not properly handle coalesced UDP packets later in the stack, resulting in packet loss. Updates #11026 Signed-off-by: Jordan Whited <jordan@tailscale.com>
20 lines
365 B
Go
20 lines
365 B
Go
// Copyright (c) Tailscale Inc & AUTHORS
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
package tstun
|
|
|
|
import (
|
|
"github.com/tailscale/wireguard-go/tun"
|
|
"tailscale.com/envknob"
|
|
)
|
|
|
|
func setLinkFeatures(dev tun.Device) error {
|
|
if envknob.Bool("TS_TUN_DISABLE_UDP_GRO") {
|
|
linuxDev, ok := dev.(tun.LinuxDevice)
|
|
if ok {
|
|
linuxDev.DisableUDPGRO()
|
|
}
|
|
}
|
|
return nil
|
|
}
|