magicsock: set the don't fragment sockopt (#8715)

This sets the Don't Fragment flag, for now behind the
TS_DEBUG_ENABLE_PMTUD envknob.

Updates #311.

Signed-off-by: Val <valerie@tailscale.com>
Signed-off-by: salman <salman@tailscale.com>
This commit is contained in:
salman aljammaz
2023-08-11 09:34:51 +01:00
committed by GitHub
parent 16bc9350e3
commit 99e06d3544
6 changed files with 106 additions and 0 deletions

View File

@@ -47,6 +47,8 @@ var (
// debugRingBufferMaxSizeBytes overrides the default size of the endpoint
// history ringbuffer.
debugRingBufferMaxSizeBytes = envknob.RegisterInt("TS_DEBUG_MAGICSOCK_RING_BUFFER_MAX_SIZE_BYTES")
// debugPMTUD enables path MTU discovery. Currently only sets the Don't Fragment sockopt.
debugPMTUD = envknob.RegisterBool("TS_DEBUG_ENABLE_PMTUD")
// Hey you! Adding a new debugknob? Make sure to stub it out in the debugknob_stubs.go
// file too.
)