mirror of
https://github.com/tailscale/tailscale.git
synced 2026-03-28 16:52:48 +01:00
For the purpose of improved observability of UDP socket receive buffer overflows on Linux. Updates tailscale/corp#37679 Signed-off-by: Jordan Whited <jordan@tailscale.com>
24 lines
459 B
Go
24 lines
459 B
Go
// Copyright (c) Tailscale Inc & contributors
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
//go:build !linux
|
|
|
|
package batching
|
|
|
|
import (
|
|
"tailscale.com/types/nettype"
|
|
)
|
|
|
|
// TryUpgradeToConn is no-op on all platforms except linux.
|
|
func TryUpgradeToConn(pconn nettype.PacketConn, _ string, _ int, _ string) nettype.PacketConn {
|
|
return pconn
|
|
}
|
|
|
|
var controlMessageSize = 0
|
|
|
|
func MinControlMessageSize() int {
|
|
return controlMessageSize
|
|
}
|
|
|
|
const IdealBatchSize = 1
|