Files
tailscale/derp/derpserver/derpserver_default.go
James Tucker 2249be1ac8 derp/derpserver, cmd/derper: add optional TCP_SAVE_SYN MSS metrics
Add --tcp-save-syn on Linux to record client MSS in a Prometheus histogram. Count retrieval outcomes separately and limit saved-SYN error logs to one per ten minutes across clients. IPv6 extension headers are unsupported.

Estimate the network-namespace SYN rate from kernel counters once per second. Disable TCP_SAVE_SYN on listeners above 100,000/s or if rate measurement fails, leaving it off until restart.

Updates tailscale/corp#49139

Signed-off-by: James Tucker <james@tailscale.com>
2026-10-07 09:37:39 -07:00

18 lines
363 B
Go

// Copyright (c) Tailscale Inc & contributors
// SPDX-License-Identifier: BSD-3-Clause
//go:build !linux || android
package derpserver
import "context"
func (c *sclient) startStatsLoop(ctx context.Context) {
// Nothing to do
return
}
// recordSavedSyn is a no-op on non-Linux platforms; TCP_SAVE_SYN is
// Linux-only.
func (c *sclient) recordSavedSyn() {}